Sha256: 4fcfd5dd178de01f57812f61fbfcbb39663f594fdc212ab7fcb8991efc2c026e
Contents?: true
Size: 998 Bytes
Versions: 28
Compression:
Stored size: 998 Bytes
Contents
# frozen_string_literal: true <% 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 # Limit the size of incoming queries: max_query_string_tokens(5000) # Stop validating when it encounters this many errors: validate_max_errors(100) end <% end -%>
Version data entries
28 entries across 28 versions & 1 rubygems