Sha256: 03557d74b066b0522f6d319646a510e9321043181dfe696acf870543cb29fee1

Contents?: true

Size: 809 Bytes

Versions: 42

Compression:

Stored size: 809 Bytes

Contents

<% module_namespacing_when_supported do -%>
class <%= schema_name %> < GraphQL::Schema
  query(Types::QueryType)
<% if options[:batch] %>
  # GraphQL::Batch setup:
  use GraphQL::Batch
<% else %>
  # For batch-loading (see https://graphql-ruby.org/dataloader/overview.html)
  use GraphQL::Dataloader
<% end %>
  # GraphQL-Ruby calls this when something goes wrong while running a query:
  def self.type_error(err, context)
    # if err.is_a?(GraphQL::InvalidNullError)
    #   # report to your bug tracker here
    #   return nil
    # end
    super
  end

  # Union and Interface Resolution
  def self.resolve_type(abstract_type, obj, ctx)
    # TODO: Implement this method
    # to return the correct GraphQL object type for `obj`
    raise(GraphQL::RequiredImplementationMissingError)
  end
end
<% end -%>

Version data entries

42 entries across 42 versions & 2 rubygems

Version Path
graphql-1.13.23 lib/generators/graphql/templates/schema.erb
graphql-1.13.22 lib/generators/graphql/templates/schema.erb
graphql-1.13.21 lib/generators/graphql/templates/schema.erb
graphql-1.13.20 lib/generators/graphql/templates/schema.erb
graphql-1.13.19 lib/generators/graphql/templates/schema.erb
graphql-1.13.18 lib/generators/graphql/templates/schema.erb
graphql-1.13.17 lib/generators/graphql/templates/schema.erb
graphql-1.13.16 lib/generators/graphql/templates/schema.erb
graphql-2.0.13 lib/generators/graphql/templates/schema.erb
graphql-2.0.12 lib/generators/graphql/templates/schema.erb
graphql-1.13.15 lib/generators/graphql/templates/schema.erb
graphql-2.0.11 lib/generators/graphql/templates/schema.erb
graphql-1.13.14 lib/generators/graphql/templates/schema.erb
graphql-1.13.13 lib/generators/graphql/templates/schema.erb
graphql-2.0.9 lib/generators/graphql/templates/schema.erb
graphql-2.0.8 lib/generators/graphql/templates/schema.erb
graphql-2.0.7 lib/generators/graphql/templates/schema.erb
graphql_cody-1.13.0 lib/generators/graphql/templates/schema.erb
graphql-1.13.12 lib/generators/graphql/templates/schema.erb
graphql-2.0.6 lib/generators/graphql/templates/schema.erb