Skip to content

Commit efca09f

Browse files
committed
Configure graphql-ruby-fragment_cache
1 parent 303c997 commit efca09f

File tree

3 files changed

+5
-0
lines changed

3 files changed

+5
-0
lines changed

app/graphql/graphql_ruby_issue_reproduction_schema.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ class GraphqlRubyIssueReproductionSchema < GraphQL::Schema
77
# For batch-loading (see https://graphql-ruby.org/dataloader/overview.html)
88
use GraphQL::Dataloader
99

10+
use GraphQL::FragmentCache
11+
1012
# GraphQL-Ruby calls this when something goes wrong while running a query:
1113
def self.type_error(err, context)
1214
# if err.is_a?(GraphQL::InvalidNullError)

app/graphql/resolvers/base_resolver.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22

33
module Resolvers
44
class BaseResolver < GraphQL::Schema::Resolver
5+
include GraphQL::FragmentCache::ObjectHelpers
56
end
67
end

app/graphql/types/base_object.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
module Types
44
class BaseObject < GraphQL::Schema::Object
5+
include GraphQL::FragmentCache::Object
6+
57
edge_type_class(Types::BaseEdge)
68
connection_type_class(Types::BaseConnection)
79
field_class Types::BaseField

0 commit comments

Comments
 (0)