Skip to content

[AT-36] Improve client:check output#934

Merged
trevor-scheer merged 3 commits intomasterfrom
trevor/improve-check-output
Jan 29, 2019
Merged

[AT-36] Improve client:check output#934
trevor-scheer merged 3 commits intomasterfrom
trevor/improve-check-output

Conversation

@trevor-scheer
Copy link
Copy Markdown
Contributor

  • Update CLI to replace checkOperations with validateOperations mutation.
  • Leverage new mutation to provide file specific data for validation errors.
  • Display messages grouped by query, with a clickable link to each query

image

Sidenote, this ^ feels pretty good but we can improve
As far as flow-y errors go, I know we can get there but as I explored the idea, it started to feel like a solid amount of work in and of itself. The short explanation is that we can currently get close, but since we don't store the raw document in the data model, we lose the source location data we would need to give a correct location.

Some more explanation: what we do now is pass around an actual Document and print() it when it's time to pass the string to the backend - we can't use this because the source formatting is lost. Sooo, when we want to perfect this, we'll need to pass that information around as well and do a little bit of math with the validation results that come back from the server.

@jbaxleyiii
Copy link
Copy Markdown
Contributor

This is so incredible

@trevor-scheer trevor-scheer changed the title Improve client:check output [AT-36] Improve client:check output Jan 29, 2019
Comment thread packages/apollo/src/diff/index.ts Outdated
Copy link
Copy Markdown
Contributor

@JakeDawkins JakeDawkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really great!! Can you add a changelog entry for these changes? :)

There should be 2 entries: one for the language server, and one for the cli

…ion.

* Leverage new mutation to provide file specific data for validation errors.

* Display messages grouped by query, with a clickable link to each query
@trevor-scheer trevor-scheer force-pushed the trevor/improve-check-output branch 2 times, most recently from 3f28e3e to 78aa056 Compare January 29, 2019 21:53
@trevor-scheer trevor-scheer force-pushed the trevor/improve-check-output branch from 78aa056 to 44d8d27 Compare January 29, 2019 21:57
@trevor-scheer trevor-scheer merged commit 90a56c9 into master Jan 29, 2019
@trevor-scheer trevor-scheer deleted the trevor/improve-check-output branch January 29, 2019 22:11
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.

3 participants