edgedb project inityarn installyarn generate:edgeqlyarn dev- Server should now be running!
This example uses the @nestjs/graphql module, setting up it's own GraphQL endpoint at localhost:3000/graphql.
tsconfig.compilerOptions.pathsensuresgenerated/edgeqlis available in sources with imports from~/edgeql.- The generated code is placed outside of
src.- It proved more convenient when having to commit the generated code into the repo (of the project making the basis for this example).
- Specifically for the purpose of building Docker images in CI.
- And without having a running EdgeDB instance to introspect.
- It proved more convenient when having to commit the generated code into the repo (of the project making the basis for this example).
- Child paths immediately inside
src/*are also available from~/*, so beware of conflicts; eg.:~/edgedbrefers tosrc/edgedb~/edgeqlrefers togenerated/edgeql
Also included in this repo are two Dockerfiles (API + EdgeDB), as well as a docker-compose.yml configuration for building and instantiating them.
- Simply running
docker-compose up -dshould do the trick. - Then
docker-compose buildto rebuild upon any changes you make to the code.