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

Use structure to extract operation name from Cell's QUERY #847

Merged
merged 5 commits into from
Jul 15, 2020

Conversation

peterp
Copy link
Contributor

@peterp peterp commented Jul 15, 2020

We want to make mocking data in Storybook and Jest super simple. In order to achieve that we need to be able to get the operation name from a QUERY export in a Cell:

export const QUERY = gql`query <i.want.this.operation.value> { invoices { id } }`
  • Add a way to get the operation name of the QUERY export in a Cell.
  • Add diagnostic to recommend that a user should name their QUERY operation in a Cell.
  • Throw an diagnostic if the template literal cannot be parser.

/cc @aldonline

@peterp peterp merged commit fb21e01 into main Jul 15, 2020
@thedavidprice thedavidprice deleted the pp-query-name-from-cell branch July 15, 2020 16:17
@thedavidprice thedavidprice added this to the next release milestone Jul 15, 2020
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.

2 participants