-
-
Notifications
You must be signed in to change notification settings - Fork 570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Schema only usage without configuration #565
Comments
We provide the tooling (such as withPostGraphQLContext and createPostGraphQLSchema) so that you may execute queries using "graphql" itself. By doing this we allow you to make optimisations, should you so desire, e.g. Skipping the verification phase and jumping straight to execute. And of course running queries on your schema with "graphql" function is the standard way throughout the GraphQL ecosystem. Further reading that may interest you: #209 |
Thanks for the info but this means graphql schema / connection pool will be created twice. It would be great If Postgraphile can at least expose schema/connection pool if not higher order query execute function. |
You can pass in a shared pool to both so the pool needn't be created twice, I don't think the schema being generated twice is a huge deal - it's only done at server startup and it doesn't consume much memory but I'm open to a PR that would allow passing the schema in to the postgraphql middleware function if it's simple enough. |
Postgrapgile has made a developer's life very easy. Ideally, I would still request a query execute function exported from Postgraphile. |
The current status on this is that you can copy the I'm going to leave this open though, because we can still do better. |
* chore(tsdoc): enable TSDoc linting (#577) * chore: add tests for GRAPHILE_TURBO (#582) * chore(types): export GraphileResolverContext * chore(release): use yarn commands * feat(watch): manual schema reload notification (#583) * chore(git): ignore .env file (#590) * chore(tests): use Jest GraphQL schema serializer (#589) * feat(omit) take "many" on constraints into account (#565) * feat(omit) take "many" on constraints into account Closes #505. * move `@omit many` constraint condition to "many" relations only and simplify the conditions a bit, outdenting `makeField` by one level Co-authored-by: Benjie Gillam <[email protected]> * feat(pg): support non-scalar range values (#591) Co-authored-by: Benjie Gillam <[email protected]> * Fix issues after rebase * More reliable? Co-authored-by: David Baumgold <[email protected]> Co-authored-by: Andreas Bergmaier <[email protected]>
* feat(omit) take "many" on constraints into account Closes #505. * move `@omit many` constraint condition to "many" relations only and simplify the conditions a bit, outdenting `makeField` by one level Co-authored-by: Benjie Gillam <[email protected]>
Thanks for amazing work.
I am using Postgraphile as a library and I also want to execute a query on the server without having to go through HTTP. My question is why it is to provide a pool and other configuration, why not Postgraphile just expose excuteQuery/excuteMutation functions as all other configurations are already set.
The text was updated successfully, but these errors were encountered: