Automatically generate GraphQL schema or customizable schema config fields from Drizzle ORM schema
by drizzle-teamTypeScript
Last 12 weeks · 0 commits
2 of 6 standards met
Fixes #33 A GraphQL filter with a boolean value of — e.g. or — is silently ignored, so the query returns all rows instead of only the matching ones. Cause: in () the per-operator loop skips falsy-looking values: The clause conflates "operator not supplied" with "operator value is ", dropping legitimate boolean filters. Fix: skip only (not-supplied), so filters are applied. Test: added a sqlite test asserting returns (the seed has no users). Verified failing before the fix (it returned all users) and passing after; full sqlite + sqlite-custom suites pass (70/70), dprint clean.
Hi there. I am using drizzle graphql for my application. My drizzle schema is getting pretty complex as the app grows, but nothing out of the ordinary. When I am generating the graphql schema using drizzle, the ram consumption sky rockets, and crashes the app because it eats up all the allocated ram (I have allocated 12 GB!). I geuss this is because of all the nested relations that is generated for each model in the database. Maybe there is an obvious quick fix for this? Otherwise it would be nice with a solution. What about a setting for buildSchema, where you can declare how deeply nested the relations in the generated schema should go?
Mainly, wanted to add customizable naming to GraphQL schema and don't break existing code, so single entity suffix is still "Single", list suffix is "" by default. My projects use singular naming for entities (eg "user", "account"), so naturally I'd like to see suffixes like this as default behavior is a bit confusing:
I am watching this project with great hopes. From experience, an auto-generated db-to-api systems needs two crucial things: Extension with custom logic (here it's a given as we can select what to expose and expand the schema with custom resolvers) Integrating some authorization scheme There used to be projects like that tried to offer that as universal third party, but is not maintained anymore. Some framework like postgraphile or pg_graphql rely on RLS, but I always thought Authr should live in the codebase, plus column based security is hard to nail. So my question would be - what do you recommend as good practice to add authorization in a stack ? Is there a plan to include something in the library itself ? Cheers
Repository: drizzle-team/drizzle-graphql. Description: Automatically generate GraphQL schema or customizable schema config fields from Drizzle ORM schema Stars: 90, Forks: 21. Primary language: TypeScript. Languages: TypeScript (100%). License: Apache-2.0. Homepage: https://www.npmjs.com/package/drizzle-graphql Topics: drizzle-orm, graphql, nodejs, typescript. Latest release: 0.8.5 (1y ago). Open PRs: 8, open issues: 19. Last activity: 1y ago. Community health: 37%. Top contributors: Sukairo-02, dankochetov, Edsol.