question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Implement 'addMissingResolvers' feature

See original GitHub issue

It would be nice if there was a addMissingResolvers(bindingName) function that would add forwardTo resolvers for any root field resolvers that are not implemented manually.

Use case. You import a (large) number of queries and mutations from a backend schema, and want forwardTo resolvers for most of them.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:6
  • Comments:5

github_iconTop GitHub Comments

2reactions
stevemucommented, Jan 28, 2018

I would like this features too.

I tried Prisma out but I reverted back to apollo. The main powerful of the Prisma to me is the auto-generated api for the underlining database, but I couldn’t access those api directly from the client side; I had create “forwardTo” for every CRUD methods, it gets tedious pretty quickly. I know how to query database and create CRUD endpoint manually, as I use rethinkdb, and it is pretty easy to do so. If I can’t utilize the auto-generated CRUD methods from Prisma, then Prisma does not save much trouble for me.

What I want is I can from the client side, access Prisma CRUD apis and my own graphql apis at the same time.

1reaction
lastmjscommented, Mar 13, 2018

@stevemu and @Weakky please take a look at this blog post: https://medium.com/@lastmjs/advanced-graphql-directive-permissions-with-prisma-fdee6f846044

It shows a simple way to automatically expose all of the generated Prisma queries and mutations as resolvers. You can easily add the few custom resolvers that you would like as well. Permissions are handled as custom directives. I feel the blog post shows a direct solution to each of your issues, let me know if you have any questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Thanks - is there any way to add auth and then forwardTo()
Implement 'addMissingResolvers' feature · Issue #37 · dotansimha/graphql-binding. It would be nice if there was a addMissingResolvers(bindingName) function ...
Read more >
A new path for graphql-binding - help us decide on ...
This is fairly important to me as I use the generated Binding types and client in node projects (non-react, for example) that use...
Read more >
graphql-binding from dotansimha - Coder Social
Implement 'addMissingResolvers' feature · Question: Is there a ways to pass args to the schema? · Add union/interface resolution · DELETED events ignored...
Read more >
graphql-binding
Implement 'addMissingResolvers' feature. kbrandwijk. kbrandwijk CLOSED · Updated 2 years ago · Make extractFragmentReplacements work automatically.
Read more >
CSS-in-JS microlibrary for making design systems ...
Utility-first CSS, as implemented by Tailwind CSS ... The sx function maps themed values to statically generated class names.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found