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

Expose lifecycle phase to plugins #289

Closed
jasonkuhrt opened this issue Oct 29, 2019 · 3 comments
Closed

Expose lifecycle phase to plugins #289

jasonkuhrt opened this issue Oct 29, 2019 · 3 comments
Labels
request-for-plugin GraphQL focused plugins that we think are useful enough to bundle in Nexus type/feat Add a new capability or enhance an existing one

Comments

@jasonkuhrt
Copy link
Contributor

We are finding ourselves blocked from reaching an ideal solution on graphql-nexus/nexus-plugin-prisma#472 because there is no way for the plugin to tell which phase of execution it is in.

The idea here is that plugins could do something like:

if (builder.phase !== 'walk') {
    console.warn('something')
}
@jasonkuhrt jasonkuhrt added type/feat Add a new capability or enhance an existing one request-for-plugin GraphQL focused plugins that we think are useful enough to bundle in Nexus labels Oct 29, 2019
@jasonkuhrt
Copy link
Contributor Author

CC @tgriesser

@tgriesser
Copy link
Member

I don't believe you even need this on plugins, just on dynamics. What do you think about #293

@Weakky
Copy link
Member

Weakky commented Oct 30, 2019

@tgriesser I think you're right!

IIUC, plugins aren't executed twice anyway so we only need that on dynamics, right?

tgriesser added a commit that referenced this issue Nov 4, 2019
* develop:
  Cleanup codegen from examples to make plugins diff less noisy (#298)
  Supply stage of builder execution to dynamics, fix #289 (#293)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
request-for-plugin GraphQL focused plugins that we think are useful enough to bundle in Nexus type/feat Add a new capability or enhance an existing one
Projects
None yet
Development

No branches or pull requests

3 participants