diff --git a/content/tools/getting-started/index.md b/content/tools/getting-started/index.md index f80bba2..f451a4f 100644 --- a/content/tools/getting-started/index.md +++ b/content/tools/getting-started/index.md @@ -34,7 +34,7 @@ Add the `graphql-java-tools` dependency: ```gradle dependencies { - implementation 'io.github.graphql-java-kickstart:graphql-java-tools:14.4.0' + implementation 'io.github.graphql-java-kickstart:graphql-java-tools:14.5.0' } ``` @@ -46,10 +46,12 @@ Add the `graphql-java-tools` dependency: io.github.graphql-java-kickstart graphql-java-tools - 14.4.0 + 14.5.0 ``` +The [release notes](https://github.com/graphql-java-kickstart/graphql-java-tools/releases) list what changed in each version, including behaviour changes and breaking changes. + ## Using the latest development build Snapshot versions of the current `master` branch are available on the Maven Central snapshot repository. Check the next snapshot version on diff --git a/content/tools/schema-definition/index.md b/content/tools/schema-definition/index.md index bd10454..3164827 100644 --- a/content/tools/schema-definition/index.md +++ b/content/tools/schema-definition/index.md @@ -230,6 +230,15 @@ SchemaParser.newParser() .scalars(myUuidScalar) ``` +The scalar's definition in the schema, and its `extend scalar` extensions, can add a description and directives: +```graphql +"A calendar date" +scalar Date @specifiedBy(url: "https://tools.ietf.org/html/rfc3339") +``` + +A description or `@specifiedBy` URL in the schema replaces the one of the scalar instance. Without one, the scalar keeps its own. +The scalar gets only the directives that the schema applies, not those of the scalar instance, and their [directive wirings]({{< relref "/tools/directives/index.md" >}}) run `onScalar`. + ## Type Dictionary Sometimes GraphQL Java Tools can't find classes when it scans your objects, usually because of limitations with interface and union types. Sometimes your Java classes don't line up perfectly with your GraphQL schema, either. GraphQL Java Tools allows you to provide additional classes manually and "rename" them if desired: diff --git a/content/tools/schema-parser-options/index.md b/content/tools/schema-parser-options/index.md index 00f42e2..d88af54 100644 --- a/content/tools/schema-parser-options/index.md +++ b/content/tools/schema-parser-options/index.md @@ -57,7 +57,16 @@ Options: * Guice * Spring AOP * Weld -* `introspectionEnabled`: Defaults to `true`. When set to `false` this option will disable schema introspection via `NO_INTROSPECTION_FIELD_VISIBILITY`. See [Field Visibility](https://www.graphql-java.com/documentation/field-visibility). +* `introspectionEnabled`: Deprecated, and will be removed in 15.0.0. Defaults to `true`. When set to `false`, every field of the introspection types is hidden, so an introspection query fails validation. + Turn introspection off with graphql-java instead, for the whole JVM or for one request: + ```java + Introspection.enabledJvmWide(false); + + var executionInput = ExecutionInput.newExecutionInput() + .query(query) + .graphQLContext(Map.of(Introspection.INTROSPECTION_DISABLED, true)); + ``` + An introspection query then fails with an "introspection disabled" error when it runs. * `fieldVisibility`: Provide a graphql field visibility implementation. This option overrides `introspectionEnabled` when used. See [Field Visibility](https://www.graphql-java.com/documentation/field-visibility). * `coroutineContext` / `coroutineContextProvider`: Provide a kotlin coroutine context to be used with suspend functions of resolvers. A suspend function runs on the calling thread until it first suspends, and continues on this context after that, so wrap blocking calls in `withContext(Dispatchers.IO)`.