Coder Social home page Coder Social logo

0xr / graphql-java-type-generator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from graphql-java/graphql-java-type-generator

0.0 2.0 0.0 226 KB

This library will autogenerate GraphQL types for usage in com.graphql-java:graphql-java

License: MIT License

Java 100.00%

graphql-java-type-generator's Introduction

graphql-java-type-generator

##About This library will autogenerate GraphQL types for usage in com.graphql-java:graphql-java

The generation of types can be controlled using different strategies.

A default strategy implementation is provided, one which reads java .classes through reflection.

The default strategy is augmentable to customize any aspect at all.

In fact, there is a customizable strategy for everything from the name of a type, to which DataFetcher a field uses, down to which input arguments are available.

##Usage Since everything about type generation is configurable, types are generated based upon a BuildContext that specifies the various strategies, parameters, and type repositories.

A DefaultBuildContext is provided, or another one can be made.

The best entry point to this library is BuildContext's .getOutputType(obj), .getInputType(obj), or .getInterfaceType(obj).

Direct access is given if, for example, only fields are needed.

#FAQ

  • Recursive object creation? Yes.
  • Java Generics? Yes, as long as type erasure has not happened.
  • Enums? Yup
  • Unions? Not yet... java doesn't really have those natively.
  • Lists? Yes, and lists of lists
  • Scalars? We additionally handle BigInteger and BigDecimal, byte, short, and char

Let us know what else you need.

graphql-java-type-generator's People

Contributors

0xr avatar andimarek avatar danielkwinsor avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.