Class: GraphitiGraphQL::SchemaProxy
- Inherits:
-
Object
- Object
- GraphitiGraphQL::SchemaProxy
- Defined in:
- lib/graphiti_graphql.rb
Instance Method Summary collapse
- #clear! ⇒ Object
-
#generate!(resources: nil, entrypoints: nil) ⇒ Object
resources: All resources to put in the schema.
- #generated ⇒ Object
- #generated? ⇒ Boolean
- #graphiti ⇒ Object
- #graphql ⇒ Object
Instance Method Details
#clear! ⇒ Object
67 68 69 |
# File 'lib/graphiti_graphql.rb', line 67 def clear! @generated = nil end |
#generate!(resources: nil, entrypoints: nil) ⇒ Object
resources: All resources to put in the schema. Mostly just for testing. entrypoints: All resources to expose as top-level query objects
58 59 60 61 |
# File 'lib/graphiti_graphql.rb', line 58 def generate!(resources: nil, entrypoints: nil) @generated = GraphitiGraphQL::Schema .generate(resources: resources, entrypoints: entrypoints) end |
#generated ⇒ Object
52 53 54 |
# File 'lib/graphiti_graphql.rb', line 52 def generated @generated ||= GraphitiGraphQL::Schema.generate end |
#generated? ⇒ Boolean
63 64 65 |
# File 'lib/graphiti_graphql.rb', line 63 def generated? !!@generated end |
#graphiti ⇒ Object
48 49 50 |
# File 'lib/graphiti_graphql.rb', line 48 def graphiti generated.graphiti_schema end |
#graphql ⇒ Object
44 45 46 |
# File 'lib/graphiti_graphql.rb', line 44 def graphql generated.schema end |