joist-orm / joist-orm/joist-orm

Add query / enums scaffolding

Open
#392 0 comments 0 reactions 0 assignees View on GitHub
hack day
Dominant language
TypeScript
Stars
385
Forks
26
Avg merge
8h 55m
Merged PRs (30d)
42

Description

I.e. auto-generate:

```
extend type Query {
costTypes: [CostTypeDetail!]!
}
```

And

```
import { CostTypes } from "src/entities";
import { QueryResolvers } from "src/generated/graphql-types";

export const costTypes: Pick = {
async costTypes() {
return [...CostTypes.getValues()];
},
};
```

Using the history file approach to do it "only once" so that the dev can delete it if they want.

Questions:

* Should `extend type Query { costTypes }` go in its own `costTypes.graphql` or our existing `enums.graphql` which is admittedly pretty large at this point?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.