graphql-java-tools

A schema-first tool for graphql-java inspired by graphql-tools for JS

MIT License

Stars
803
Committers
77

Bot releases are hidden (Show)

graphql-java-tools - 6.0.2

Published by oliemansm over 4 years ago

Use copy of schema directive helper classes from graphql-java instead of relying on reflection.

graphql-java-tools - 6.0.1

Published by oliemansm over 4 years ago

  • Removed Guava dependency
  • Upgraded dependencies of kotlin and jackson
  • List of IDs not resolved correctly #367
graphql-java-tools - 6.0.0

Published by oliemansm over 4 years ago

Thanks to the contributors the following issues have been fixed in this release:

  • Upgrade graphql-java to version 14
  • Renamed base package to graphql.kickstart.tools
  • Treat non-nullable scalars as scalars #341
  • Treat array of non-null scalars as scalars #358
  • Add the TrivialDataFetcher interface to MethodFieldResolver so that it can be excluded from tracing #337
  • Ignore proxies when scanning for field resolvers #348
  • Make coroutine scope configurable via context #350
  • Add compile check for dependency convergence #352
  • Changed default CoroutineScope to not use GlobalScope to avoid potential cancellation issues and other pitfalls #359
  • Fix unwrapGenericType to properly find generic type in arguments Map #361
  • Move DirectiveBehavior out of graphql.schema.idl package #364
graphql-java-tools - 5.6.1

Published by oliemansm over 5 years ago

Thanks to the contributors the following issues have been fixed in this release:

  • Upgrade graphql-java to version 13
  • Warning log: Schema type was defined but can never be accessed, and can be safely deleted: PageInfo #215
  • Nullable boolean in input with default value throws CoercingSerializeException #251
  • Default values for enum fields on input types not set correctly #257
  • Utils throws IllegalAccessException in JDK 9 or higher #265
  • GraphQLCodeRegistry.Builder is null in custom SchemaDirectiveWirings #268
  • Possible type leaking when serializing java -> graphql #276
  • SchemaParser#createInputObject issue creating directives #280
graphql-java-tools - 5.6.0

Published by oliemansm over 5 years ago

Upgraded to graphql-java 12.0

graphql-java-tools - 5.5.2

Published by oliemansm over 5 years ago

Enhancements

  • Allow configuration of CoroutineContextProvider so that context can be created per request instead of just at startup

Bugfixes

  • Add arguments in correct order when creating building Object
graphql-java-tools - 5.4.1

Published by oliemansm almost 6 years ago

Enhancements

  • #166 Support for directives on ENUM_VALUE
  • #213 Accept List in SchemaParserBuilder.scalars

Bugfixes

  • #209 Unable to match type definition
  • #210 RelayConnectionFactory generates nullable connection types
  • #188 Cannot find field from parent interface
  • #183 Unable to find generic type of class... for an interface
graphql-java-tools - 5.4.0

Published by oliemansm almost 6 years ago

Features

Graphql-java 11.0

Upgraded graphql-java to 11.0. See their release notes fur further details.

Type Definition Factory

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.

Automatic generation of Relay Type Definitions

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.

Directives

Support for directives has been included now. See https://www.graphql-java-kickstart.com/tools/directives/ for more details and basic usage.

Other features

#104 Coroutine support

graphql-java-tools - 5.3.5

Published by oliemansm almost 6 years ago

Support Java 11

Upgraded commons-lang3 to version 3.8.1 to support Java 11.

graphql-java-tools - 5.3.4

Published by oliemansm almost 6 years ago

Support for PropertyDataFetcher behavior

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!
}

Option for disabling introspection query

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.

graphql-java-tools - 5.3.3

Published by oliemansm about 6 years ago

Updated Maven coordinates in Central

The artifacts are available in Maven Central starting with this version.

graphql-java-tools - 5.3.1

Published by oliemansm about 6 years ago

Changed organization

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 generic types

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 graphql-java dependency

Updated to the latest 10.0 version of graphql-java.

Other fixes

https://github.com/graphql-java-kickstart/graphql-java-tools/issues?utf8=%E2%9C%93&q=milestone%3A5.3.1

Package Rankings
Top 6.67% on Proxy.golang.org
Top 6.22% on Repo1.maven.org
Badges
Extracted from project README
Github Build Maven Central Discuss on GitHub
Related Projects