tinnou / graphql-codegen Goto Github PK
View Code? Open in Web Editor NEWGraphQL Schema to code generator
License: MIT License
GraphQL Schema to code generator
License: MIT License
Hi! Thanks a lot for your work. It's great code generator!
In my case some class is implementing several interfaces. Their schema is like:
{
"kind": "OBJECT",
"name": "myClass",
"description": "No description for myClass",
"fields": [],
"inputFields": null,
"interfaces": [
{
"kind": "INTERFACE",
"name": "firstInterface",
"ofType": null
},
{
"kind": "INTERFACE",
"name": "secondInterface",
"ofType": null
}
],
"enumValues": null,
"possibleTypes": null
}
, so generated code should looks like:
public class MyClass implements FirstInterface, SecondInterface {
....
}
public interface FirstInterface {
....
}
public interface SecondInterface {
....
}
but the result of generating of the code is:
public class Appy_Deployment implements firstInterface, implements secondInterface {
....
}
public interface FirstInterface {
....
}
public interface SecondInterface {
....
}
and we have:
I've already fixed this issue in my local copy, so I can push code with fixes to some branch if you grant me the appropriate permissions.
Hi!
There are some small issue with generating Enum types.
Now our generated code is looks like:
public enum jump {
START,
END
private String value;
jump (String value) {
this.value = value;
}
@Override
public String toString() {
return value;
}
}
but. the good code would be that:
public enum **J**ump {
START**("start")**,
END**("end");**
private String value;
jump (String value) {
this.value = value;
}
**public String getValue() {
return value;
}**
@Override
public String toString() {
return value;
}
}
for example(or for testing), here is part of schema:
{
"kind": "ENUM",
"name": "game",
"description": "Valid field values for game",
"fields": null,
"inputFields": null,
"interfaces": null,
"enumValues": [
{
"name": "start",
"description": null,
"isDeprecated": false,
"deprecationReason": null
},
{
"name": "end",
"description": null,
"isDeprecated": false,
"deprecationReason": null
}
],
"possibleTypes": null
}
I've already fixed this issue, so I can push code with fixes to some branch if you provide me permissions.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.