Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 1.57 KB

README.md

File metadata and controls

33 lines (22 loc) · 1.57 KB

graphql-java-custom-scalars

CircleCI Codacy Badge Codacy Badge

https://search.maven.org/artifact/io.github.ketiko/graphql-java-custom-scalars

Custom Graphql Scalars for Java

This adds some custom Graphql scalars not found in the standard https://github.com/graphql-java/graphql-java library.

The https://github.com/graphql-java/graphql-java-extended-scalars project already adds many custom scalars. However they do not have a UUID scalar yet. There is a PR to add one, graphql-java/graphql-java-extended-scalars#18.

This project add more scalars not found in either of these projects.

Usage

First, register the scalar as a bean.

  // GraphqlConfig

  @Bean
  public GraphQLScalarType registerUuidScalar() {
    return CustomScalars.Uuid;
  }

Second, include the scalar in your graphql schema file.

# schema.graphqls

scalar UUID