Skip to content
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

Add postgraphile cache to PostGraphile handler. #545

Closed
RoryKelly opened this issue Jun 7, 2020 · 3 comments
Closed

Add postgraphile cache to PostGraphile handler. #545

RoryKelly opened this issue Jun 7, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@RoryKelly
Copy link

I am using GraphQL mesh in a lambda.

The postgraphile handler introspects the database on start up, leading to slow lambda startup times. Postgraphile has a workaround for this documented [here]§(https://www.graphile.org/postgraphile/deploying-lambda/)

I imagine this as a config on in the yaml

sources:
  - name: database
    handler:
      postgraphile:
        connectionString: ${DATABASE_URL}
        introspectionCache: true

Then on graphql-mesh generate-sdk it also generates a cache.

@RoryKelly
Copy link
Author

RoryKelly commented Jun 8, 2020

I think a similar issue exists for the graphql handler, It makes a request on startup to load the schema. Would be nice to manually add a schema file.

I think this will be an issue for a variety of handlers when deployed to lambda. Would be great to have a Cli feature where handlers can create a cache of the data the require for startup. Will make new issue

@ardatan
Copy link
Owner

ardatan commented Jun 8, 2020

You're right! We need to implement introspection caching for other handlers, too. For now, in the next release we will have cacheIntrospection option for neo4j,postgraphile and graphql handlers. Others will have this soon!

@ardatan
Copy link
Owner

ardatan commented Jun 8, 2020

@ardatan ardatan closed this as completed Jun 8, 2020
klippx pushed a commit to klippx/graphql-mesh that referenced this issue Oct 9, 2024
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants