Git Product home page Git Product logo

graphql-java-codegen's Introduction

GraphQL Codegen

Build Discussions License: MIT

Sonarcloud Status SonarCloud Coverage SonarCloud Bugs SonarCloud Vulnerabilities

GraphQL Java Codegen makes it easy to make your Java application to follow a schema-first approach whether it is a server or client application.

Following classes can be generated based on your GraphQL schema:

  • Interfaces for GraphQL queries, mutations and subscriptions.
  • Interfaces for GraphQL unions.
  • POJO classes for GraphQL types and inputs.
  • Enum classes for GraphQL enums.
  • Interfaces for GraphQL type fields (e.g. for parametrized fields) aka "Resolvers".
  • Client Request classes for GraphQL queries, mutations and subscriptions.

Features

  • Generate classes in Java, Kotlin or Scala.
  • Recursive schemas lookup by file name pattern.
  • Generate code based on GraphQL schema or GraphQL Query Introspection Result.
  • Generate POJOs with or without: Builder pattern, immutable fields, toString(), equals() and hashCode(), etc.
  • Flexible API interfaces naming conventions (based on schema file name, folder name, etc.)
  • Custom java package names for model and API classes.
  • Custom prefix/suffix for model, API, type resolver, request, response classes.
  • Custom annotations for generated classes (e.g.: validation annotations for generated model classes or specific type fields, annotations for GraphQL directives, etc.)
  • Relay support.
  • Ability to define codegen configuration via external json file.

For the full list of codegen configs please refer to: Codegen Options

Supported plugins

Contributing

Please see CONTRIBUTING.md.

Inspired by

swagger-codegen

graphql-java-codegen's People

Contributors

kobylynskyi avatar dependabot[bot] avatar jxnu-liguobin avatar joffrey-bion avatar benmccann avatar meistermeier avatar robbertnoordzij avatar streibeb avatar lorenzleutgeb avatar donbeave avatar kbrooks avatar valinha avatar a-stewart avatar lmartellotto avatar zmack avatar danilo-barboza avatar daknin avatar gdhordain avatar jamespeters98 avatar enttq avatar aigyptios avatar renebl avatar blocha avatar wouterg avatar yarlyashenko avatar aldib avatar jay3047 avatar jtwing62173 avatar rolevinks avatar timw6n 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.