Extension
Internal GraphQL Server
Execute GraphQL queries directly within your application, using PHP code.
This extension installs an internal GraphQL Server, that can be invoked within your application, using PHP code.
The internal GraphQL server is accessed via class GatoGraphQL\InternalGraphQLServer\GraphQLServer
, through these three methods:
executeQuery
: Execute a GraphQL queryexecuteQueryInFile
: Execute a GraphQL query contained in a (.gql
) fileexecutePersistedQuery
: Execute a persisted GraphQL query (providing its ID as an int, or slug as a string) (the Persisted Queries extension is required)
These are the method signatures:
To execute a GraphQL query and obtain the response content: