Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

How do you generate the resolver layer in code instead of memory? #2210

Open
RobZaenglein opened this issue Nov 13, 2020 · 2 comments
Open
Labels
question Further information is requested resolvers triage

Comments

@RobZaenglein
Copy link

I need to modify the default CRUD resolvers that are currently stored in memory when buildGraphbackAPI is called. The readme has the follow tidbit:

  • Generates an unopiniated GraphQL resolver layer (as code or in memory)

I do not see how to use the graphback-cli anywhere in the documentation that would instead generate these resolvers into the codebase.

Any help would be appreciated.

@RobZaenglein RobZaenglein added the question Further information is requested label Nov 13, 2020
@machi1990
Copy link
Contributor

Automatically generated comment to notify maintainers
/cc @craicoverflow, @machi1990, @wtrocki

@wtrocki
Copy link
Contributor

wtrocki commented Nov 13, 2020

We have separate package that we used for codegeneration, however we did not had any community members or internal usages that will require code.
Once we started writing very advanced versions we decided to remove codegen support.

Old version of the graphback were doing that. See deprecated package:
https://www.npmjs.com/package/@graphback/codegen-resolvers

Hope that clarifies situation.

Graphback itself is very extensive so anyone can come and create template that will have codegen plugin using things they want to use.
We found out that codegen is very hard as things starting to get opiniated - some might like Knex. Some might like raw SQL etc.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested resolvers triage
Projects
None yet
Development

No branches or pull requests

3 participants