SchemaUtils

SchemaUtils

new SchemaUtils()

The SchemaUtils is used by tools such as GQLExpressMiddleware in order to
apply GraphQL Lattice specifics to the build schema.

Source:

Methods

(static) ⌾⠀injectComments(schema, Classes)

Until such time as I can get the reference Facebook GraphQL AST parser to
read and apply descriptions or until such time as I employ the Apollo
AST parser, providing a static get apiDocs() getter is the way to get
your descriptions into the proper fields, post schema creation.

This method walks the types in the registered classes and the supplied
schema type. It then injects the written comments such that they can
be exposed in graphiql and to applications or code that read the meta
fields of a built schema

Since:
  • 2.7.0
Source:
Parameters:
Name Type Description
schema Object

a built GraphQLSchema object created via buildSchema
or some other alternative but compatible manner

Classes Array.<function()>

these are GQLBase extended classes used to
manipulate the schema with.