Skip to content

Commit

Permalink
Merge branch 'main' into feat/mongo-db
Browse files Browse the repository at this point in the history
  • Loading branch information
timonmasberg committed Apr 16, 2023
2 parents df36121 + e58bf02 commit 706444a
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,22 @@ accepted

## Context

Apollo GraphQL offers 2 approaches to create and maintain a GraphQL schema: Code First and Schema First. We have to choose one of them to start developing our Graph.
Apollo GraphQL offers 2 approaches to create and maintain a GraphQL schema: Code
First and Schema First. We have to choose one of them to start developing our
Graph.

## Decision

We are using the Code First approach which generates a GraphQL schema from TypeScript classes and their annotations.
With the Code First approach, we have type safety out of the box and we can generate the schema automatically.
Furthermore, the knowledge about GraphQL schema specifications is rare in the team, which also contributed to this decision.
We are using the Code First approach which generates a GraphQL schema from
TypeScript classes and their annotations. With the Code First approach, we have
type safety out of the box and we can generate the schema automatically.
Furthermore, the knowledge about GraphQL schema specifications is rare in the
team, which also contributed to this decision.

## Consequences

- It is easier to setup, maintain and refactor.
- We can think in TypeScript models and types while developing our schema, which should enable us to develop faster.
- We might hit a barrier which we currently can not see with the Code First Approach when our schema gets complex.
- We can think in TypeScript models and types while developing our schema, which
should enable us to develop faster.
- We might hit a barrier which we currently can not see with the Code First
Approach when our schema gets complex.
56 changes: 28 additions & 28 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions tools/db/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ running on your maschine.
### Test Data

The data for the test database is within the [`data`](./data/) folder. If you
want to create a new collection, use the [`template.ts`](./data/template.ts) as a starter for your
file. The naming of the file should be `<collection name>.data.ts`.
want to create a new collection, use the [`template.ts`](./data/template.ts) as
a starter for your file. The naming of the file should be
`<collection name>.data.ts`.
Please adjust the test data in your branch if you introduce migrations!

### Start
Expand Down

0 comments on commit 706444a

Please sign in to comment.