PHP implementation of the GraphQL specification based on the reference implementation in JavaScript
MIT License
Bot releases are visible (Hide)
Published by spawnia over 1 year ago
SchemaPrinter
with static::
to enable overridesPublished by spawnia over 1 year ago
query
and queryId
, let persistedQueryLoader
handle it https://github.com/webonyx/graphql-php/pull/1372
Published by spawnia over 1 year ago
PhpEnumType
https://github.com/webonyx/graphql-php/pull/1368
Published by spawnia over 1 year ago
ResolveInfo::getFieldSelection()
https://github.com/webonyx/graphql-php/pull/1365
Published by spawnia over 1 year ago
OperationDefinitionNode.variableDefinitions
is initializedPublished by spawnia over 1 year ago
@throws
accuratelyPublished by spawnia over 1 year ago
Published by spawnia over 1 year ago
directives
and arguments
in Node
with empty NodeList
Published by spawnia over 1 year ago
Published by spawnia over 1 year ago
SchemaPrinter
Published by spawnia over 1 year ago
QueryPlan
for union
typesQueryPlan
performancePublished by spawnia over 1 year ago
QueryPlan
when querying __typename
on a union
typePublished by spawnia almost 2 years ago
Published by spawnia almost 2 years ago
Error
when failing to serialize an Enum typeType
and its subclassesSerializationError
over client safe Error
when failing to serialize leaf typesextensions
keyRequestError
with useful message when clients provide an invalid JSON bodyBlockString
from namespace GraphQL\Utils
to GraphQL\Language
GraphQL::getStandardDirectives()
, GraphQL::getStandardTypes()
and GraphQL::getStandardValidationRules()
FieldDefinition
to QueryComplexity
Type
directly without an intermediary callablenull
ServerConfig
option persistentQueryLoader
to persistedQueryLoader
EnumType::parseValue()
and EnumType::parseLiteral()
PromiseAdapter::createRejected()
to require \Throwable
NamedType
out of Type
: $name
, $description
, $config
, isBuiltInType()
, assertValid()
Node::toArray()
Directive::$config['args']
use the same definition style as FieldDefinition::$config['args']
FieldArgument
to Argument
QueryPlan
options from ['group-implementor-fields']
to ['groupImplementorFields' => true]
in ResolveInfo::lookAhead()
PromiseAdapter::convertThenable()
before calling ->then()
on themJSON_THROW_ON_ERROR
in json_encode()
assert()
PromiseAdapter::all()
accepts iterable
Introspection::fromSchema()
returns no dataASTValidationContext
to interface ValidationContext
Utils::suggestionList()
with the reference implementation (#1075)GraphQL\Utils\AST::typeFromAST()
now needs a type loader callable instead of the SchemaStandardServer
"
instead of """
for single line descriptionsHelper::emitResponse()
private, use Helper::sendResponse()
StandardServer
graphql-js
reference implementationDocumentValidator
assert()
or schema validationHasSelectionSet::$selectionSet
with HasSelectionSet::getSelectionSet()
TypeDefinitionNode::$name
with TypeDefinitionNode::getName()
TypeExtensionNode::$name
with TypeExtensionNode::getName()
AST::concatAST()
utilityUniqueEnumValueNames
UniqueOperationTypes
(#995)DocumentValidator::removeRule()
Node
implement JsonSerializable
UniqueTypeNames
(#998)KnownTypeNames
rule (#999)UniqueArgumentDefinitionNames
(#1136)parseValue
config option to InputObjectType to parse input value to custom value objectsortTypes
to have SchemaPrinter
order types alphabeticallyEnumType
from PHP enumTypeInfo::getParentTypeStack()
and TypeInfo::getFieldDefStack()
__typename
foreach
over slower functions array_map()
and Utils::map()
QueryPlan
crash when multiple $fieldNodes
are presentQueryPlan
with different optionsarray
or stdClass
to an input objectnull
parent of list in ValuesOfCorrectType::getVisitor
query
and queryId
, ignore queryId
in that caseSchemaExtender::extend()
NodeList
in Node::cloneDeep()
Schema::getType()
on a schema built from SDL returns null
for unknown types (#1068)QueryComplexity
ruleFormattedError::addDebugEntries()
twice when using default error formattingiterable
in implementations of PromiseAdapter::all()
OperationParams
method getOriginalInput()
in favor of public property $originalInput
OperationParams
method isReadOnly()
in favor of public property $readOnly
Utils::withErrorHandling()
TypeComparators::doTypesOverlap()
DocumentValidator::isError()
DocumentValidator::append()
Utils::getVariableType()
in favor of Utils::printSafe()
isDeprecated
in field definition configWrappingType::getWrappedType()
argument $recurse
in favor of WrappingType::getInnermostType()
Type::assertType()
ListOfType::$ofType
, ListOfType::getOfType()
and NonNull::getOfType()
commentDescriptions
from BuildSchema::buildAST()
, BuildSchema::build()
and Printer::doPrint()
$options
from ASTDefinitionBuilder
FieldDefinition::create()
in favor of new FieldDefinition()
GraphQL\Exception\InvalidArgument
Utils::find()
, Utils::every()
and Utils::invariant()
bool $exitWhenDone
from StandardServer::send500Error()
and StandardServer::handleRequest()
Schema::getAstNode()
in favor of Schema::$astNode
Schema
option types
, use Type::overrideStandardTypes()
GraphQL\Utils\TypeInfo::typeFromAST()
, use GraphQL\Utils\AST::typeFromAST()
StandardServer::send500Error()
, handle non-GraphQL errors yourselfStandardServer::getHelper()
, use new Helper
category
, use custom error formatting if you still need itType::getInternalTypes()
GraphQL::execute()
GraphQL::executeAndReturnResult()
FormattedError::create()
and FormattedError::createFromPHPError()
GraphQL::setPromiseAdapter()
AST::getOperation()
BreakingChangesFinder
DocumentValidator::isValidLiteralValue()
Error::formatError()
and Error::toSerializableArray()
GraphQL::getInternalDirectives()
Schema::isPossibleType()
TypeInfo
Values::valueFromAST()
and Values::isValidPHPValue()
InputObjectField::$type
FieldDefinition::$type
GraphQL\Validator\Rules\AbstractQuerySecurity
, use GraphQL\Validator\Rules\QuerySecurityRule
GraphQL\Validator\Rules\AbstractValidationRule
, use GraphQL\Validator\Rules\ValidationRule
GraphQL\Utils\FindBreakingChanges
, use GraphQL\Utils\BreakingChangesFinder
Published by spawnia almost 2 years ago
Fixed:
Published by spawnia almost 2 years ago
Error
when failing to serialize an Enum typeType
and its subclassesSerializationError
over client safe Error
when failing to serialize leaf typesextensions
keyRequestError
with useful message when clients provide an invalid JSON bodyBlockString
from namespace GraphQL\Utils
to GraphQL\Language
GraphQL::getStandardDirectives()
, GraphQL::getStandardTypes()
and GraphQL::getStandardValidationRules()
FieldDefinition
to QueryComplexity
Type
directly without an intermediary callablenull
ServerConfig
option persistentQueryLoader
to persistedQueryLoader
EnumType::parseValue()
and EnumType::parseLiteral()
PromiseAdapter::createRejected()
to require \Throwable
NamedType
out of Type
: $name
, $description
, $config
, isBuiltInType()
, assertValid()
Node::toArray()
Directive::$config['args']
use the same definition style as FieldDefinition::$config['args']
FieldArgument
to Argument
QueryPlan
options from ['group-implementor-fields']
to ['groupImplementorFields' => true]
in ResolveInfo::lookAhead()
PromiseAdapter::convertThenable()
before calling ->then()
on themJSON_THROW_ON_ERROR
in json_encode()
assert()
PromiseAdapter::all()
accepts iterable
Introspection::fromSchema()
returns no dataASTValidationContext
to interface ValidationContext
Utils::suggestionList()
with the reference implementation (#1075)GraphQL\Utils\AST::typeFromAST()
now needs a type loader callable instead of the SchemaStandardServer
"
instead of """
for single line descriptionsHelper::emitResponse()
private, use Helper::sendResponse()
StandardServer
graphql-js
reference implementationDocumentValidator
assert()
or schema validationAST::concatAST()
utilityUniqueEnumValueNames
UniqueOperationTypes
(#995)DocumentValidator::removeRule()
Node
implement JsonSerializable
UniqueTypeNames
(#998)KnownTypeNames
rule (#999)UniqueArgumentDefinitionNames
(#1136)parseValue
config option to InputObjectType to parse input value to custom value objectsortTypes
to have SchemaPrinter
order types alphabeticallyEnumType
from PHP enumTypeInfo::getParentTypeStack()
and TypeInfo::getFieldDefStack()
__typename
foreach
over slower functions array_map()
and Utils::map()
QueryPlan
crash when multiple $fieldNodes
are presentQueryPlan
with different optionsarray
or stdClass
to an input objectnull
parent of list in ValuesOfCorrectType::getVisitor
query
and queryId
, ignore queryId
in that caseSchemaExtender::extend()
NodeList
in Node::cloneDeep()
Schema::getType()
on a schema built from SDL returns null
for unknown types (#1068)QueryComplexity
ruleFormattedError::addDebugEntries()
twice when using default error formattingOperationParams
method getOriginalInput()
in favor of public property $originalInput
OperationParams
method isReadOnly()
in favor of public property $readOnly
Utils::withErrorHandling()
TypeComparators::doTypesOverlap()
DocumentValidator::isError()
DocumentValidator::append()
Utils::getVariableType()
in favor of Utils::printSafe()
isDeprecated
in field definition configWrappingType::getWrappedType()
argument $recurse
in favor of WrappingType::getInnermostType()
Type::assertType()
ListOfType::$ofType
, ListOfType::getOfType()
and NonNull::getOfType()
commentDescriptions
from BuildSchema::buildAST()
, BuildSchema::build()
and Printer::doPrint()
$options
from ASTDefinitionBuilder
FieldDefinition::create()
in favor of new FieldDefinition()
GraphQL\Exception\InvalidArgument
Utils::find()
, Utils::every()
and Utils::invariant()
bool $exitWhenDone
from StandardServer::send500Error()
and StandardServer::handleRequest()
Schema::getAstNode()
in favor of Schema::$astNode
Schema
option types
, use Type::overrideStandardTypes()
GraphQL\Utils\TypeInfo::typeFromAST()
, use GraphQL\Utils\AST::typeFromAST()
StandardServer::send500Error()
, handle non-GraphQL errors yourselfStandardServer::getHelper()
, use new Helper
category
, use custom error formatting if you still need itType::getInternalTypes()
GraphQL::execute()
GraphQL::executeAndReturnResult()
FormattedError::create()
and FormattedError::createFromPHPError()
GraphQL::setPromiseAdapter()
AST::getOperation()
BreakingChangesFinder
DocumentValidator::isValidLiteralValue()
Error::formatError()
and Error::toSerializableArray()
GraphQL::getInternalDirectives()
Schema::isPossibleType()
TypeInfo
Values::valueFromAST()
and Values::isValidPHPValue()
InputObjectField::$type
FieldDefinition::$type
GraphQL\Validator\Rules\AbstractQuerySecurity
, use GraphQL\Validator\Rules\QuerySecurityRule
GraphQL\Validator\Rules\AbstractValidationRule
, use GraphQL\Validator\Rules\ValidationRule
GraphQL\Utils\FindBreakingChanges
, use GraphQL\Utils\BreakingChangesFinder
Published by spawnia about 2 years ago
Error
when failing to serialize an Enum typeType
and its subclassesSerializationError
over client safe Error
when failing to serialize leaf typesextensions
keyRequestError
with useful message when clients provide an invalid JSON bodyBlockString
from namespace GraphQL\Utils
to GraphQL\Language
GraphQL::getStandardDirectives()
, GraphQL::getStandardTypes()
and GraphQL::getStandardValidationRules()
FieldDefinition
to QueryComplexity
Type
directly without an intermediary callablenull
ServerConfig
option persistentQueryLoader
to persistedQueryLoader
EnumType::parseValue()
and EnumType::parseLiteral()
PromiseAdapter::createRejected()
to require \Throwable
NamedType
out of Type
: $name
, $description
, $config
, isBuiltInType()
, assertValid()
Node::toArray()
Directive::$config['args']
use the same definition style as FieldDefinition::$config['args']
FieldArgument
to Argument
QueryPlan
options from ['group-implementor-fields']
to ['groupImplementorFields' => true]
in ResolveInfo::lookAhead()
PromiseAdapter::convertThenable()
before calling ->then()
on themJSON_THROW_ON_ERROR
in json_encode()
assert()
PromiseAdapter::all()
accepts iterable
Introspection::fromSchema()
returns no dataASTValidationContext
to interface ValidationContext
Utils::suggestionList()
with the reference implementation (#1075)GraphQL\Utils\AST::typeFromAST()
now needs a type loader callable instead of the SchemaStandardServer
"
instead of """
for single line descriptionsHelper::emitResponse()
private, use Helper::sendResponse()
StandardServer
graphql-js
reference implementationAST::concatAST()
utilityUniqueEnumValueNames
UniqueOperationTypes
(#995)DocumentValidator::removeRule()
Node
implement JsonSerializable
UniqueTypeNames
(#998)KnownTypeNames
rule (#999)UniqueArgumentDefinitionNames
(#1136)parseValue
config option to InputObjectType to parse input value to custom value objectsortTypes
to have SchemaPrinter
order types alphabeticallyEnumType
from PHP enumTypeInfo::getParentTypeStack()
and TypeInfo::getFieldDefStack()
__typename
foreach
over slower functions array_map()
and Utils::map()
array
or stdClass
to an input objectnull
parent of list in ValuesOfCorrectType::getVisitor
query
and queryId
, ignore queryId
in that caseSchemaExtender::extend()
NodeList
in Node::cloneDeep()
Schema::getType()
on a schema built from SDL returns null
for unknown types (#1068)QueryComplexity
ruleFormattedError::addDebugEntries()
twice when using default error formattingOperationParams
method getOriginalInput()
in favor of public property $originalInput
OperationParams
method isReadOnly()
in favor of public property $readOnly
Utils::withErrorHandling()
TypeComparators::doTypesOverlap()
DocumentValidator::isError()
DocumentValidator::append()
Utils::getVariableType()
in favor of Utils::printSafe()
isDeprecated
in field definition configWrappingType::getWrappedType()
argument $recurse
in favor of WrappingType::getInnermostType()
Type::assertType()
ListOfType::$ofType
, ListOfType::getOfType()
and NonNull::getOfType()
commentDescriptions
from BuildSchema::buildAST()
, BuildSchema::build()
and Printer::doPrint()
$options
from ASTDefinitionBuilder
FieldDefinition::create()
in favor of new FieldDefinition()
GraphQL\Exception\InvalidArgument
Utils::find()
, Utils::every()
and Utils::invariant()
bool $exitWhenDone
from StandardServer::send500Error()
and StandardServer::handleRequest()
Schema::getAstNode()
in favor of Schema::$astNode
Schema
option types
, use Type::overrideStandardTypes()
GraphQL\Utils\TypeInfo::typeFromAST()
, use GraphQL\Utils\AST::typeFromAST()
StandardServer::send500Error()
, handle non-GraphQL errors yourselfStandardServer::getHelper()
, use new Helper
category
, use custom error formatting if you still need itType::getInternalTypes()
GraphQL::execute()
GraphQL::executeAndReturnResult()
FormattedError::create()
and FormattedError::createFromPHPError()
GraphQL::setPromiseAdapter()
AST::getOperation()
BreakingChangesFinder
DocumentValidator::isValidLiteralValue()
Error::formatError()
and Error::toSerializableArray()
GraphQL::getInternalDirectives()
Schema::isPossibleType()
TypeInfo
Values::valueFromAST()
and Values::isValidPHPValue()
InputObjectField::$type
FieldDefinition::$type
GraphQL\Validator\Rules\AbstractQuerySecurity
, use GraphQL\Validator\Rules\QuerySecurityRule
GraphQL\Validator\Rules\AbstractValidationRule
, use GraphQL\Validator\Rules\ValidationRule
GraphQL\Utils\FindBreakingChanges
, use GraphQL\Utils\BreakingChangesFinder
Published by spawnia about 2 years ago
Error
when failing to serialize an Enum typeType
and its subclassesSerializationError
over client safe Error
when failing to serialize leaf typesextensions
keyRequestError
with useful message when clients provide an invalid JSON bodyBlockString
from namespace GraphQL\Utils
to GraphQL\Language
GraphQL::getStandardDirectives()
, GraphQL::getStandardTypes()
and GraphQL::getStandardValidationRules()
FieldDefinition
to QueryComplexity
Type
directly without an intermediary callablenull
ServerConfig
option persistentQueryLoader
to persistedQueryLoader
EnumType::parseValue()
and EnumType::parseLiteral()
PromiseAdapter::createRejected()
to require \Throwable
NamedType
out of Type
: $name
, $description
, $config
, isBuiltInType()
, assertValid()
Node::toArray()
Directive::$config['args']
use the same definition style as FieldDefinition::$config['args']
FieldArgument
to Argument
QueryPlan
options from ['group-implementor-fields']
to ['groupImplementorFields' => true]
in ResolveInfo::lookAhead()
PromiseAdapter::convertThenable()
before calling ->then()
on themJSON_THROW_ON_ERROR
in json_encode()
assert()
PromiseAdapter::all()
accepts iterable
Introspection::fromSchema()
returns no dataASTValidationContext
to interface ValidationContext
Utils::suggestionList()
with the reference implementation (#1075)GraphQL\Utils\AST::typeFromAST()
now needs a type loader callable instead of the SchemaStandardServer
"
instead of """
for single line descriptionsHelper::emitResponse()
private, use Helper::sendResponse()
StandardServer
graphql-js
reference implementationAST::concatAST()
utilityUniqueEnumValueNames
UniqueOperationTypes
(#995)DocumentValidator::removeRule()
Node
implement JsonSerializable
UniqueTypeNames
(#998)KnownTypeNames
rule (#999)UniqueArgumentDefinitionNames
(#1136)parseValue
config option to InputObjectType to parse input value to custom value objectsortTypes
to have SchemaPrinter
order types alphabeticallyEnumType
from PHP enumTypeInfo::getParentTypeStack()
and TypeInfo::getFieldDefStack()
foreach
over slower functions array_map()
and Utils::map()
array
or stdClass
to an input objectnull
parent of list in ValuesOfCorrectType::getVisitor
query
and queryId
, ignore queryId
in that caseSchemaExtender::extend()
NodeList
in Node::cloneDeep()
Schema::getType()
on a schema built from SDL returns null
for unknown types (#1068)QueryComplexity
ruleFormattedError::addDebugEntries()
twice when using default error formattingType::getInternalTypes()
GraphQL::execute()
GraphQL::executeAndReturnResult()
FormattedError::create()
and FormattedError::createFromPHPError()
GraphQL::setPromiseAdapter()
AST::getOperation()
BreakingChangesFinder
DocumentValidator::isValidLiteralValue()
Error::formatError()
and Error::toSerializableArray()
GraphQL::getInternalDirectives()
Schema::isPossibleType()
TypeInfo
Values::valueFromAST()
and Values::isValidPHPValue()
InputObjectField::$type
FieldDefinition::$type
GraphQL\Validator\Rules\AbstractQuerySecurity
, use GraphQL\Validator\Rules\QuerySecurityRule
GraphQL\Validator\Rules\AbstractValidationRule
, use GraphQL\Validator\Rules\ValidationRule
GraphQL\Utils\FindBreakingChanges
, use GraphQL\Utils\BreakingChangesFinder
OperationParams
method getOriginalInput()
in favor of public property $originalInput
OperationParams
method isReadOnly()
in favor of public property $readOnly
Utils::withErrorHandling()
TypeComparators::doTypesOverlap()
DocumentValidator::isError()
DocumentValidator::append()
Utils::getVariableType()
in favor of Utils::printSafe()
isDeprecated
in field definition configWrappingType::getWrappedType()
argument $recurse
in favor of WrappingType::getInnermostType()
Type::assertType()
ListOfType::$ofType
, ListOfType::getOfType()
and NonNull::getOfType()
commentDescriptions
from BuildSchema::buildAST()
, BuildSchema::build()
and Printer::doPrint()
$options
from ASTDefinitionBuilder
FieldDefinition::create()
in favor of new FieldDefinition()
GraphQL\Exception\InvalidArgument
Utils::find()
, Utils::every()
and Utils::invariant()
bool $exitWhenDone
from StandardServer::send500Error()
and StandardServer::handleRequest()
Schema::getAstNode()
in favor of Schema::$astNode
Schema
option types
, use Type::overrideStandardTypes()
GraphQL\Utils\TypeInfo::typeFromAST()
, use GraphQL\Utils\AST::typeFromAST()
StandardServer::send500Error()
, handle non-GraphQL errors yourselfStandardServer::getHelper()
, use new Helper
Published by spawnia about 2 years ago
Published by spawnia about 2 years ago