This library contains the java model representing the response returned by a GraphQL server to the introspection query used to get the GraphQL Schema.
It does not contain a parser for a schema written using the schema definition language (or SDL).
URLs
-
Project home (this page)
| Do you want to improve this page? Please edit it on GitHub. |
Usage
The library is hosted on maven central:
<dependency>
<groupId>fr.jmini.graphql</groupId>
<artifactId>graphql-schema-model</artifactId>
<version>1.0.0</version>
</dependency>
fr.jmini.graphql:graphql-schema-model:1.0.0
Run the instrospection query and use the model classes that correspond to the returned JSON.
Source Code
As for any java project, the source code of the plugin is available in the src/ folder.
Build
This project is using gradle.
Command to build the sources locally:
./gradlew build
Command to run the tool locally, passing the --help argument to the application:
./gradlew run --args="--help"
Command to deploy to your local maven repository:
./gradlew publishToMavenLocal
Command to build the documentation page:
./gradlew asciidoctor
The output of this command is an HTML page located at <git repo root>/build/docs/html5/index.html.
For project maintainers
Following properties are expected to be set (for example in ~/.gradle/gradle.properties):
-
signing.gnupg.keyName -
signing.gnupg.passphrase -
ossSonatypeUsername -
ossSonatypePassword
Command to upload the documentation page on GitHub pages:
./gradlew gitPublishPush
Command to perform a release:
./gradlew release -Prelease.useAutomaticVersion=true
Using ssh-agent
Some tasks requires to push into the distant git repository (release task or updating the gh-pages branch).
If they are failing with errors like this:
org.eclipse.jgit.api.errors.TransportException: ... Permission denied (publickey).
Then ssh-agent can be used.
eval `ssh-agent -s` ssh-add ~/.ssh/id_rsa
(source for this approach)
Get in touch
Use the GraphQL Schema model issue tracker on GitHub.
You can also contact me on Twitter: @j2r2b