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

Fix compilation bug with persistent_term backend #982

Merged

Conversation

binaryseed
Copy link
Contributor

This PR fixes a compile time bug with the persistent_term schema backend.

PopulatePersistentTerm.run/2 was only getting called during compilation. So if another file changes but not the schema module, it doesn't get re-compiled and thus it's not populated - this can cause compile-time references to the schema to fail.

This is fixed by populating the persistent_term backend upon @on_load. This also means we don't need to startup a GenServer in the user's app to populate, which paves the way for easier adoption of this in the future.

@benwilson512

@benwilson512 benwilson512 merged commit cdb8c39 into absinthe-graphql:master Oct 22, 2020
@benwilson512
Copy link
Contributor

This is awesome, thank you!

@binaryseed binaryseed deleted the persistent_term-populate branch October 22, 2020 16:46
@binaryseed
Copy link
Contributor Author

I think this PR is flawed, so I have a PR that fixes the original failure we were encountering absinthe-graphql/absinthe_plug#234

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants