lib/graphql/result_cache.rb in graphql-result_cache-0.1.1 vs lib/graphql/result_cache.rb in graphql-result_cache-0.1.2
- old
+ new
@@ -14,10 +14,13 @@
# to expire the cache when client hash changes, should be a proc. eg:
# c.client_hash = -> { Rails.cache.read(:deploy_version) }
attr_accessor :client_hash
+ attr_accessor :introspection
+ alias introspection? introspection
+
# ```
# GraphQL::ResultCache.configure do |c|
# c.namespace = "GraphQL:Result"
# c.expires_in = 1.hour
# c.client_hash = -> { Rails.cache.read(:deploy_version) }
@@ -29,9 +32,10 @@
end
# Default configuration
@expires_in = 3600 # 1.hour
@namespace = 'GraphQL:Result'
+ @introspection = false
def self.use(schema_def, options: {})
schema_def.instrument(:field, ::GraphQL::ResultCache::FieldInstrument.new)
end
end