A GraphQL SDL lexer, parser, and validator that generates a traversable Abstract Syntax Tree from your GraphQL schema. GraphQL-Xtext will generate pure Java Objects that can be used at runtime.
The EMF objects can be used to implement Apollo Federation Spec and build a purely java based service that is truly open source.
This project uses java 8
and maven 3.3+
.
-
Download and install Eclipse 2019.
-
Install Xtext SDK in Eclipse:
a. In Eclipse, clickHelp --> Install New Software
b. In Available Software, click Add to add a repository with location:
http://download.eclipse.org/modeling/tmf/xtext/updates/composite/releases/
-
Restart Eclipse.
- Clone graphql-xtext
- Import the cloned project in Eclipse, click
File --> Import Project --> Maven --> Existing Maven Project
- Under the directory
com.intuit.graphql
, right click onGenerateGraphQL.mwe2 --> Run As --> 1 MWE2 Workflow
Right-click on the com.intuit.graphql.ide
directory and Run As Eclipse Application
mvn clean install
Graphql-Xtext builds a Language Server executable under com.intuit.graphql.parent/com.intuit.graphql.ide/target/
, named
com.intuit.graphql.ide-x.y.z-ls.jar
. This can be used to build generic application and cloud-based IDEs for the grammar.
theia-xtext
is an example of a cloud-based IDE that uses the xtext language server jar.
Read the Contribution guide