diff --git a/index.html b/index.html index 35b187e..1a3bb09 100755 --- a/index.html +++ b/index.html @@ -219,9 +219,9 @@ are used. Instead, it provides tools for creating rich API for your existing app
Also, several complementary tools are available which provide integrations with existing PHP frameworks, add support for Relay, etc.
@@ -280,5 +280,5 @@ existing PHP frameworks, add support for Relay, etc. diff --git a/mkdocs/search_index.json b/mkdocs/search_index.json index b251f80..27d7a3d 100755 --- a/mkdocs/search_index.json +++ b/mkdocs/search_index.json @@ -327,22 +327,22 @@ }, { "location": "/type-system/type-language/", - "text": "Defining your schema\n\n\nType language\n is a convenient way to define your schema,\nespecially with IDE autocompletion and syntax validation.\n\n\nHere is a simple schema defined in GraphQL type language (e.g. in a separate \nschema.graphql\n file):\n\n\nschema {\n query: Query\n mutation: Mutation\n}\n\ntype Query {\n greetings(input: HelloInput!): String!\n}\n\ninput HelloInput {\n firstName: String!\n lastName: String\n}\n\n\n\n\nIn order to create schema instance out of this file, use \n\nGraphQL\\Utils\\BuildSchema\n:\n\n\ntoArray(), true));\n} else {\n $document = AST::fromArray(require $cacheFilename); // fromArray() is a lazy operation as well\n}\n\n$typeConfigDecorator = function () {};\n$schema = BuildSchema::build($document, $typeConfigDecorator);", + "text": "Defining your schema\n\n\nSince 0.9.0\n\n\nType language\n is a convenient way to define your schema,\nespecially with IDE autocompletion and syntax validation.\n\n\nHere is a simple schema defined in GraphQL type language (e.g. in a separate \nschema.graphql\n file):\n\n\nschema {\n query: Query\n mutation: Mutation\n}\n\ntype Query {\n greetings(input: HelloInput!): String!\n}\n\ninput HelloInput {\n firstName: String!\n lastName: String\n}\n\n\n\n\nIn order to create schema instance out of this file, use \n\nGraphQL\\Utils\\BuildSchema\n:\n\n\ntoArray(), true));\n} else {\n $document = AST::fromArray(require $cacheFilename); // fromArray() is a lazy operation as well\n}\n\n$typeConfigDecorator = function () {};\n$schema = BuildSchema::build($document, $typeConfigDecorator);", "title": "Using Type Language" }, { "location": "/type-system/type-language/#defining-your-schema", - "text": "Type language is a convenient way to define your schema,\nespecially with IDE autocompletion and syntax validation. Here is a simple schema defined in GraphQL type language (e.g. in a separate schema.graphql file): schema {\n query: Query\n mutation: Mutation\n}\n\ntype Query {\n greetings(input: HelloInput!): String!\n}\n\ninput HelloInput {\n firstName: String!\n lastName: String\n} In order to create schema instance out of this file, use GraphQL\\Utils\\BuildSchema : toArray(), true));\n} else {\n $document = AST::fromArray(require $cacheFilename); // fromArray() is a lazy operation as well\n}\n\n$typeConfigDecorator = function () {};\n$schema = BuildSchema::build($document, $typeConfigDecorator);", + "text": "Since 0.10.0 Method build() produces a lazy schema \nautomatically, so it works efficiently even with very large schemas. But parsing type definition file on each request is suboptimal, so it is recommended to cache \nintermediate parsed representation of the schema for the production environment: toArray(), true));\n} else {\n $document = AST::fromArray(require $cacheFilename); // fromArray() is a lazy operation as well\n}\n\n$typeConfigDecorator = function () {};\n$schema = BuildSchema::build($document, $typeConfigDecorator);", "title": "Performance considerations" }, { diff --git a/sitemap.xml b/sitemap.xml index 781dff5..6af8aae 100755 --- a/sitemap.xml +++ b/sitemap.xml @@ -4,7 +4,7 @@Since 0.9.0
Type language is a convenient way to define your schema, especially with IDE autocompletion and syntax validation.
Here is a simple schema defined in GraphQL type language (e.g. in a separate schema.graphql file):
@@ -224,6 +225,7 @@ because it is impossible to resolve actual implementations during execution.Also, we have to rely on default field resolver and root value in order to execute a query against this schema.
Since 0.10.0
In order to enable Interfaces, Unions and custom field resolvers you can pass the second argument: type config decorator to schema builder.
It accepts default type config produced by the builder and is expected to add missing options like @@ -243,6 +245,7 @@ $schema = BuildSchema::build($contents, $typeConfigDecorator);
Since 0.10.0
Method build() produces a lazy schema automatically, so it works efficiently even with very large schemas.
But parsing type definition file on each request is suboptimal, so it is recommended to cache