Skip to main content

Utilities

Most GraphQL utilities can be found in the utilities folder in package:leto_schema.

buildSchema​

Create a GraphQLSchema from a GraphQL Schema Definition (SDL) document String.

printSchema​

Transform a GraphQLSchema into a String in the GraphQL Schema Definition Language (SDL).

extendSchema​

Experimental. Extend a GraphQLSchema with an SDL document. This will return an extended GraphQLSchema with the additional types, fields, inputs and directives provided in the document.

introspectionQuery​

Create an introspection document query for retrieving Schema information from a GraphQL server.

mergeSchemas​

Experimental. Merge multiple GraphQLSchema. The output GraphQLSchema contains all the query, mutations and subscription fields from the input schemas. Nested objects are also merged.

schemaFromJson​

Experimental. Build a GraphQLSchema from a JSON value, will add query, mutation, subscription and custom events on top of the provided JSON value. Will try to infer the types from the JSON structure.