Check out the demo: users-dashboard
p.s. The theme is picked based on system preferences but can be changed.
npm install
npm run schema
npm run types
npm start
Executing npm run schema
in terminal will run the following command
apollo client:download-schema --endpoint=https://uyx9x.sse.codesandbox.io ./src/schema.json
It will download a remote schema and save it as schema.json
inside ./src/
directory.
To see detailed explanation of what each flag does - please refer to official documentation on apollo client:download
Executing npm run types
in terminal will run the following command
apollo client:codegen ./src/__generated__/types.ts --outputFlat --includes=./src/**/queries.ts --addTypename --localSchemaFile=./src/schema.json --target=typescript
It will generate types based on ./src/schema.json
and place them in ./src/__generated__/types.ts
.
To see detailed explanation of what each flag does - please refer to official documentation on apollo client:codegen