nitrogql Recipes
nitrogql can be used with a variety of frameworks and tools. Find examples for common use cases below.
Next.js
This example shows how to use nitrogql with Next.js. It demonstrates the schema-based approach to GraphQL by containing both the server-side and client-side code in a single project.
It uses the generate
command to generate types from your schema and operations. The generated types are used with urql to fetch data from a GraphQL API.
Vite
This example shows how to use nitrogql with Vite. It also demonstrates use of nitrogql with external GraphQL API. Introspection result of the API is contained in the project and is used as a schema definition.
nitrogql accepts introspection JSON as a schema definition in place of .graphql
files. This allows you to use nitrogql for applications that use external GraphQL APIs.
Want more?
If you have a use case that is not covered by the examples above, please let us know! Also please check out Top Page for planned features.