This commit introduces the auto-configuration infrastructure for testing
Spring GraphQL applications with mock/embedded servers.
The new `@AutoConfigureGraphQlTester` annotation can contribute a
`GraphQlTester` bean to the test context for testing the application.
Closes gh-46
- Support for one or more DataFetcherExceptionResolver beans
- ErrorType enum with common error categories
- Default handling of unresolved exceptions as ErrorType.INTERNAL_ERROR
Closes gh-51
Following revisions in the spec
https://github.com/graphql/graphql-spec/pull/777, this commit applies
similar changes to type and method names where feasible.
The chief exception for now is the use of "query" for request input
since that is what it is called in the JSON for GraphQL over HTTP.
This commit changes the default location for the GraphQL schema from
`classpath:schema.graphqls` to `classpath:/graphql/schema.graphqls`.
We're also adding `.graphqlconfig` files that are leveraged by a GraphQL
JS plugin in IntelliJ IDEA.
Closes gh-44
Prior to this commit, we introduced a basic implementation for GraphQL
metrics with Spring GraphQL. The main problem was that we were tracking
the GraphQL queries themselves and those are good candidates for
tags cardinality explosion.
This commit revisits the metrics arrangement and introduces:
* `graphql.request` as the main metric; this tracks the execution of a
single request (i.e. multiple queries)
* `graphql.datafetcher` for tracking data fetching operations.
* `graphql.error` for counting errors.
Closes gh-19
Rename "headers" to "responseHeaders" and clarify those work for HTTP
request queries but not for queries over a WebSocket session.
Update getter for response headers to return a read-only wrapper.
Provide only one public constructor without headers.
See gh-42
Use getters so the base RequestInput is usable for JSON serialization,
e.g. for the testing support.
Remove WebSocketMessageInput which only had an extra requestId and
add that to WebInput instead.
See gh-42
Rename to GraphQLService to make it more clear it is a layer below
the specific transport such as HTTP endpoints.
Add WebGraphQLService sub-interface for query execution in web
environment with a WebInterceptor chain.
See gh-42