-
-
Save jenny-codes/0e340f08454ec233bb9a2411d7c44e35 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class HiSchema < GraphQL::Schema | |
# default limits | |
max_depth 10 | |
max_complexity 300 | |
# root types | |
query Types::Query # required | |
mutation Types::Mutation # optional | |
subscription Types::Subscription # optional | |
# plugins | |
use GraphQL::Batch | |
use GraphQL::Tracing::NewRelicTracing | |
# Define hooks as class methods: | |
def self.resolve_type(type, obj, ctx) | |
# ... | |
end | |
def self.object_from_id(node_id, ctx) | |
# ... | |
end | |
def self.id_from_object(object, type, ctx) | |
# ... | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment