Nexus Documentation
Welcome!
Robust, composable type definition for GraphQL in TypeScript/JavaScript.
Note: The documentation is very new and may contain some gaps, please help us fill them in by opening issues or better yet, pull-requests when you think something could be explained better. The examples are a great place to look to better understand how the library can be used.
Nexus aims to combine the simplicity and ease of development of SDL development approaches like graphql-tools with the long-term maintainability of programmatic construction, as seen in graphene-python, graphql-ruby, or graphql-js.
Nexus builds upon the primitives of graphql-js, and attempts to take the simplicity of the SDL schema-first approach and pair it with the power of having the full language runtime at your disposal.
Nexus was designed with TypeScript/JavaScript intellisense in mind, and combines TypeScript generics, conditional types, and type merging to provide full auto-generated type coverage out of the box.
Check out the example projects to get some ideas of what this looks like in practice, or try it out in the playground to see what we mean!
Installation
If you are using TypeScript version 4.1 is suggested. Nexus doesn't have a hard requirement for it yet but may in a future non-breaking release.
Example
As documented in the API reference GraphQL Nexus provides a consistent, scalable approach to defining GraphQL types in code.