- Language : Typescript : https://www.typescriptlang.org
- Runtime : NodeJS : https://nodejs.org/en
- GraphQL : Apollo : https://www.apollographql.com/docs/apollo-server/
- ORM : Prisma : https://www.prisma.io/docs/orm
- DB : Sqlite : Also supports MySql, Postgres and MS Sql Server
Recommended to develop on Linux, or Mac based systems.
-
Install NodeJS
-
from the root of this directory run the following in a terminal to install project dependencies
npm install npm run db:generate-client npm run start:dev
-
in a browser navigate to http://localhost:4000 to start iterating and testing the graph
npm run start:build: builds the application for productionnpm run start:dev: starts a dev server, that will reactively restart the server as code is changednpm run start:prod: starts the prod server, requires thatnpm run buildis executed firstnpm run codegen: Generates graphQL types from./src/schema.graphql. Run this immediately after changing./src/schema.graphqlnpm run db:studio: opens a GUI for running CRUD operations on the databasenpm run db:generate-client: generates a new ORM client when./prisma/schema.prisma changes
Execute npm run start:dev, then navigate in a browser to localhost:4000 to interact with the graph defined in this application
-
Using your preferred tool (git cli, Github Desktop, etc), fork this repository, create a branch in your fork and open a pull request back to this repository
-
Define a graphql schema to allow querying one model from the Starwars API : https://swapi.dev/documentation
-
implement resolvers that consume the starwars API to satisfy requests from newly defined graphql schema
-
implement one mutation, that will locally store additional attributes for the chosen starwas API model, store this additional data using Prisma
-
extend the graphql schema to support merging any additional data (from Prisma) and the starwars api data to queries against the graph
-
we will setup a time to discuss and run the code together, and iterate on the implementation.