Documentation

GraphQLSchemaProvider
in package

Table of Contents

Constants

INTROSPECTION_CACHE_KEY  = 'graphql.introspection.full_schema'
INTROSPECTION_QUERY  = ' query IntrospectionQuery { __schema { types { kind name description fields(includeDeprecated: true) { name description args { name description type { ...TypeRef } defaultValue } type { ...TypeRef } isDeprecated deprecationReason } inputFields { name description type { ...TypeRef } defaultValue } interfaces { kind name ofType { kind name } } enumValues(includeDeprecated: true) { name description isDeprecated deprecationReason } possibleTypes { kind name } } queryType { name } mutationType { name } subscriptionType { name } } } fragment TypeRef on __Type { kind name ofType { kind name ofType { kind name ofType { kind name } } } } '

Properties

$executor  : GraphQLExecutor

Methods

__construct()  : mixed
getFullSchema()  : string
getSchemaFilteredByTypes()  : string
-------------------------------------------------------------- Filter schema by a list of root types --------------------------------------------------------------
buildReducedSchema()  : Schema
Build reduced schema (filtered Query & Mutation)
collectTypeDependencies()  : void
Recursive dependency resolver
extractTypes()  : array<string|int, mixed>
Collect all dependent types recursively
unwrapFinalType()  : Type
Helper to unwrap LIST / NON_NULL

Constants

INTROSPECTION_CACHE_KEY

public mixed INTROSPECTION_CACHE_KEY = 'graphql.introspection.full_schema'

INTROSPECTION_QUERY

public mixed INTROSPECTION_QUERY = ' query IntrospectionQuery { __schema { types { kind name description fields(includeDeprecated: true) { name description args { name description type { ...TypeRef } defaultValue } type { ...TypeRef } isDeprecated deprecationReason } inputFields { name description type { ...TypeRef } defaultValue } interfaces { kind name ofType { kind name } } enumValues(includeDeprecated: true) { name description isDeprecated deprecationReason } possibleTypes { kind name } } queryType { name } mutationType { name } subscriptionType { name } } } fragment TypeRef on __Type { kind name ofType { kind name ofType { kind name ofType { kind name } } } } '

Properties

Methods

getSchemaFilteredByTypes()

-------------------------------------------------------------- Filter schema by a list of root types --------------------------------------------------------------

public getSchemaFilteredByTypes(array<string|int, mixed> $rootTypes) : string
Parameters
$rootTypes : array<string|int, mixed>
Return values
string

buildReducedSchema()

Build reduced schema (filtered Query & Mutation)

protected buildReducedSchema(Schema $schema, array<string|int, mixed> $allowedTypes) : Schema
Parameters
$schema : Schema
$allowedTypes : array<string|int, mixed>
Return values
Schema

collectTypeDependencies()

Recursive dependency resolver

protected collectTypeDependencies(Type $type, array<string|int, mixed> &$collected, Schema $schema) : void
Parameters
$type : Type
$collected : array<string|int, mixed>
$schema : Schema

extractTypes()

Collect all dependent types recursively

protected extractTypes(Schema $schema, array<string|int, mixed> $rootTypes) : array<string|int, mixed>
Parameters
$schema : Schema
$rootTypes : array<string|int, mixed>
Return values
array<string|int, mixed>

unwrapFinalType()

Helper to unwrap LIST / NON_NULL

protected unwrapFinalType(Type $type) : Type
Parameters
$type : Type
Return values
Type

        
On this page

Search results