You can use the Graphback CLI to generate a new GraphQL project in minutes.
Initializing with npx:
Or by installing Graphback CLI globally:
The CLI will ask you to choose from one of two templates:
apollo-fullstack-ts: Apollo GraphQL server and React client using TypeScript and PostgreSQL.
apollo-runtime: Apollo GraphQL server with in-memory Graphback schema and CRUD resolvers.
In a few seconds you should have an empty GraphQL application.
To change the default application configuration see Graphback Config.
See Defining your Data model for how to design your data model.
Once your data model is complete, run
graphback generatefrom your project to generate a GraphQL schema and API.
Graphback provides a number of different data sources which can be configured at application runtime. See Data Sources.
If you are using a PostgreSQL datasource you can migrate your database to match your schema by running
graphback db. See Database Migrations for more.
Run your application!