Schema data structure module

This module contains various data structures in the form of dataclasses that are used to represent GraphQL schemas in Subgrounds using an AST-like approach.

class subgrounds.schema.SchemaMeta(*, queryType, types, type_map=None, mutationType=None, subscriptionType=None)#

Class representing a GraphQL schema.

Contains all type definitions.

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.


Returns the type information of the type reference typeref


typeref (T) -- The type reference pointing to the type of interest.


KeyError -- If the type reference refers to a non-existant type


Type information

Return type:

subgrounds.schema.TypeMeta.ScalarMeta | subgrounds.schema.TypeMeta.ObjectMeta | subgrounds.schema.TypeMeta.EnumMeta | subgrounds.schema.TypeMeta.InterfaceMeta | subgrounds.schema.TypeMeta.UnionMeta | subgrounds.schema.TypeMeta.InputObjectMeta


Returns the argument or field definition's underlying type

type_of_input_object_meta(tmeta, args)#

Recursively finds the nested type