Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/orta/graphql-api-goals
Notes on what I'd like for a pretty ideal API codebase
https://github.com/orta/graphql-api-goals
Last synced: about 2 months ago
JSON representation
Notes on what I'd like for a pretty ideal API codebase
- Host: GitHub
- URL: https://github.com/orta/graphql-api-goals
- Owner: orta
- License: mpl-2.0
- Created: 2022-12-14T08:15:15.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2023-03-29T16:26:52.000Z (over 1 year ago)
- Last Synced: 2024-03-10T09:30:50.679Z (7 months ago)
- Size: 20.5 KB
- Stars: 9
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# graphql-api-goals
Notes on what I'd like for a pretty ideal API framework. 2 years into Redwood, and I'm really happy with how it's been as a tool for getting ideas up & running, then migrating out when it's time for an abstraction to get more focus.
Name: Burl?
### Codebase would be:
- In TypeScript
- Trivial to run in debug mode inside VS Code
- Few testing abstractions, want to run many tests very often on hooks
### Deno/Node?- Deno would allow for better debugging, faster iteration and native TS
- Node means keeping acccess to Jest and Wallaby### Abstractions
Lot of good stuff take from Redwood here, they have a generalized "functions" concept, then a lot of extra work for making a main GraphQL API.
##### GraphQL
- Prisma -> SDL -> GraphQL Resolvers for main GQL API
- Describe in SDL first, then resolvers. Make extremely tight.
- Built-in support for graphql connections
- Be able to know how many unqiue back & forths between the API a request took
- Even better if that is generic so I can do the samme for extrnal services I need to ping##### Code Positioning
- Need a formalized "lib" section, with linter rules if resolvers get too long
- Perhaps "scopes" e.g. "src/scope/leaderboard/archive.ts"Probably need a similar place for tasks code
##### Jobs
Being able to spin up a second version of the API with the specific goal of doing long-run or cron tasks should be a native feature
##### Systems
- Hooks for allowing side processes (type codegen, relay for example) during dev
- Keep auth as ACLs baked into the SDL
- Systems for running tasks
- Hot reloading for servers?
- Type generation
- Trivial system for### Things to look into:
- https://pothos-graphql.dev/docs/plugins/prisma
- [Grafast](https://www.youtube.com/watch?v=x0FMjL5-kNI) to try remove the amount of pre-guessing I do for includes on db queries
- [GraphQXL](https://github.com/gabotechs/graphqxl)
- [prisma in memory](https://github.com/demonsters/prisma-mock/)
- [Grats](https://github.com/captbaritone/grats)