Prior to this commit, the `@Argument` annotation would support two
attributes: `required` and `defaultValue`, specifying whether arguments
should be considered as required and default values to use if they're
not present.
This can be problematic as this can already be specified at the schema
level.
To avoid duplication and invalid setups betweens schema and Controllers,
this commit removes those attributes in favor of the schema definition.
Closes gh-150
Prior to this commit, the auto-configuration was scanning for
`"*.graphql,*.gql,*.graphqls,*.gqls"` files in the configured locations.
This was not flexible enough, as developers could not customize the
considered file extensions when scanning for files.
This commit provides a new `spring.graphql.schema.file-extensions`
configuration property that enables such customizations.
Because `"*.graphql,*.gql"` extensions seem to be tied to queries
(and not schemas), this commit also changes the default value to only
consider the `"*.graphqls,*.gqls"` file extensions by default.
Closes gh-134
Closes gh-135
This commit applies the Compiler Conventions Gradle plugin to the
project modules and fix the issues raised by the compiler linter.
This commit also moves version management to the main build file for a
few dependencies, aligning the versions in the process.
As of gh-81, specific security components are contributed by the
GraphQL Security auto-configuration.
This commit removes those from the custom SecurityConfig classes.
The adapter aims to:
- simplify the common case of synchronous resolution to a single error
- support ThreadLocal context propagation on an opt-in basis
This replaces the SyncDataFetcherExceptionResolver and removes the need
to propagate ThreadLocal context to every resolver.
The errorType field on GraphQLError is specific to GraphQL Java and when
serialized via GraphqlErrorHelper#toSpecification it becomes an
extension with the key "classification".
This commit ensures that we correctly deserialize back to errorType from
the "classification" extension but unfortunately that's limited to the
ErrorClassification enums that we know of.
Spring Data repositories that support Querydsl are now supported
as DataFetchers returning single objects and iterables including
projection support.
See gh-59
This is unlikely to happen as authentication happens prior to reaching
the GraphQL APIs. However, a user may decide to implement security within
GraphQL as it is possible to do through a Spring Controller.
This commit refactors the project build to better share dependency
management definitions between modules.
This also upgrades the project to Spring Boot 2.5.0.
Closes gh-45