1 | # graphql-lattice ([www.graphql-lattice.com](https://www.graphql-lattice.com))
|
2 | ![GraphQL Logo](http://www.graphql-lattice.com/assets/lattice/logo_circled_256x256.png)
|
3 |
|
4 | ## About
|
5 | Lattice for GraphQL is a lightweight implementation pattern/framework that is meant to provide a basis for your applications to fetch exactly the data that your needs demand; be they web, native mobile or desktop applications.
|
6 |
|
7 | This is especially true for projects where your GraphQL object type definitions are better designed and served by not being muddled down on how to programmatically merge each type and its query and mutation types into a single GraphQL IDL document someplace.
|
8 |
|
9 | Through the use of GraphQL's provided abstract syntax tree, or AST, toolkit, your object types can be automatically read from disk on server startup. Each type and their associated IDL definitions are calculated and merged for you. This results in a dynamically generated schema string that can be consumed easily by `express-graphql` or other similar libraries.
|
10 |
|
11 | ### _State of Things_
|
12 |
|
13 | #### Current Limitations
|
14 | * Currently only tested for use with Express 4.x, express-graphql and graphql-js.
|
15 |
|
16 | #### TODO List
|
17 | - [ ] `GQLExpressMiddleware` to be modified to take a directory containing your projects object type definition sources. These should all descend from `GQLBase` directly. This is in lieu of currently taking references to each class you want to have included manually. *This should be an optional alternative*.
|
18 | - [ ] Safely merge more than `ObjectTypeDefinition` AST types. Currently as these exist outside of the default implementation, they have not been fully explored by me.
|
19 | - [x] Provide mechanism to specify docs for graphiql
|
20 | - [x] Provide support for GraphQLObjectType definitions
|
21 | - [x] Provide support for GraphQLInterfaceType definitions
|
22 | - [ ] Provide support for GraphQLUnionType definitions
|
23 | - [ ] Provide support for GraphQL subscriptions
|
24 | - [x] Provide emitter support for GQLBase and derivatives
|
25 | - [x] Provide decorator support for @Schema
|
26 | - [x] Provide decorator support for @AdjacentSchema
|
27 | - [x] Provide decorator support for @Getters, @Setters, @Properties (since 2.1, 2.4 provided alias renaming, 2.5 provides type instantiation)
|
28 |
|
29 | ## What is GraphQL?
|
30 | Facebook's site on GraphQL states that GraphQL is, "A query language for your API." It goes on to say
|
31 |
|
32 | > GraphQL is a query language for APIs and a runtime for fulfilling those queries with your existing data. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools.
|
33 |
|
34 | Facebook provides an excellent source of information on learning GraphQL and interfacing it with various server side language implementations that you might be using. To learn more about this, head over to [their site](https://www.graphql.org).
|
35 |
|
36 | ## Examples
|
37 | ***Coming Soon***
|