A schema-first tool for graphql-java inspired by graphql-tools for JS
MIT License
Bot releases are hidden (Show)
Published by oliemansm over 4 years ago
Use copy of schema directive helper classes from graphql-java instead of relying on reflection.
Published by oliemansm over 4 years ago
Published by oliemansm over 4 years ago
Thanks to the contributors the following issues have been fixed in this release:
graphql.kickstart.tools
Published by oliemansm over 5 years ago
Thanks to the contributors the following issues have been fixed in this release:
Published by oliemansm over 5 years ago
Upgraded to graphql-java 12.0
Published by oliemansm over 5 years ago
Published by oliemansm almost 6 years ago
ENUM_VALUE
Published by oliemansm almost 6 years ago
Upgraded graphql-java to 11.0. See their release notes fur further details.
Added the type definition factory to make it possible to dynamically add type definitions after the SDL has been parsed. This is used to automatically generate Relay connection type definitions. See https://www.graphql-java-kickstart.com/tools/type-definition-factory/ for more details.
Relay Type Definitions can now be automatically generated using the @connection
directive. See https://www.graphql-java-kickstart.com/tools/relay/ for more details and basic usage.
Support for directives has been included now. See https://www.graphql-java-kickstart.com/tools/directives/ for more details and basic usage.
#104 Coroutine support
Published by oliemansm almost 6 years ago
Upgraded commons-lang3
to version 3.8.1
to support Java 11.
Published by oliemansm almost 6 years ago
When using graphql-java alone and taking the approach of writing DataFetchers, the framework will allow you to return a Map object that contains the property names and values for the corresponding GraphQL type and the framework will then map this to the appropriate GraphQL type using the PropertyDataFetcher (as described in https://graphql-java.readthedocs.io/en/latest/schema.html under DataFetcher and TypeResolver).
This same behavior was not supported when using graphql-java-tools with the GraphQLResolver approach up until now.
Here is an example:
public class Book {
private int id;
private String name;
private int authorId;
// constructor and getters/setters ...
}
public class BookResolver implements GraphQLResolver<Book> {
public Map author(Book book) {
return Collections.unmodifiableMap(new HashMap<String, Object>() {
{
put("id", "1");
put("name", "smith");
}
});
}
}
The GraphQL schema file is:
type Query {
books: [Book!]
}
type Book {
id: Int!
name: String!
author: Author!
}
type Author {
id: Int!
name: String!
}
Graphql-java provides a feature to disable the introspection query: https://graphql-java.readthedocs.io/en/latest/execution.html?highlight=introspection#limiting-field-visibility. They do warn that it puts your server in contravention of the GraphQL specification and expectations of most clients so use this with caution.
Published by oliemansm about 6 years ago
The artifacts are available in Maven Central starting with this version.
Published by oliemansm about 6 years ago
Starting with this release the project has moved out of the graphql-java organization into graphql-java-kickstart. This because they are in fact separate projects where maintainers of the one actually weren't involved in maintenance of the other. This resulted in it becoming quite unclear what is actually graphql-java and what was a library on top. This confusion was clearly visible in the Gitter channel as well. That's why we split the projects and the Gitter channels.
Maven
<dependency>
<groupId>com.graphql-java-kickstart</groupId>
<artifactId>graphql-java-tools</artifactId>
<version>5.3.1</version>
</dependency>
Gradle
compile 'com.graphql-java-kickstart:graphql-java-tools:5.3.1'
Support for generics has been improved. This makes it easier to implement pagination for example. Instead of having to create concrete classes one could now do:
import graphql.relay.Connection
import graphql.relay.SimpleListConnection
@Component
class QueryResolver implements GraphQLQueryResolver {
private UserService userService;
Connection<User> users(int first, String after, DataFetchingEnvironment env) {
return new SimpleListConnection<User>(userService.filter(page, size)).get(env);
}
}
Updated to the latest 10.0 version of graphql-java.