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

Descriptions appear empty when fetched through URL introspection #1378

Closed
spawnia opened this issue Apr 7, 2020 · 5 comments
Closed

Descriptions appear empty when fetched through URL introspection #1378

spawnia opened this issue Apr 7, 2020 · 5 comments
Milestone

Comments

@spawnia
Copy link
Contributor

spawnia commented Apr 7, 2020

When running a diff from a remote schema against a local schema, the descriptions of the remote schema appear empty.

graphql-inspector diff http://remote.example/graphql local.graphql
 Detected the following changes (1) between schemas:
 ✔ Field Query.example description changed from ' to Some example description.'

I checked the sent introspection query (it includes description) and the result (the field actually has a description).

This error does not occur when comparing two local schemas, different descriptions are detected correctly. When comparing two remote schema's, differences in the descriptions are ignored.

Using version 1.27.0.

@kamilkisiela
Copy link
Owner

@spawnia could you share the description or even part of your schema? Even just Query.example

@kamilkisiela
Copy link
Owner

I think it's comparing two descriptions correctly but it cuts of a description after ' and ". That's probably because of bolderize function and its regex.

@kamilkisiela kamilkisiela added ⚙️ work in progress Someone is working on it 🐞 bug Something isn't working labels Apr 7, 2020
@kamilkisiela kamilkisiela added this to the 1.30.0 milestone Apr 7, 2020
@spawnia
Copy link
Contributor Author

spawnia commented Apr 8, 2020

Here is a minimal example you can reproduce yourself:

# schema.graphql
type Query {
  """
  Some description
  """
  example: ID
}

I brought up a test server through:

yarn global add graphql-faker && graphql-faker schema.graphql

Then i compared the schema against the running server:

vagrant@asdf:~ $ graphql-inspector diff schema.graphql http://localhost:9002/graphql
✔ Field Query.example description changed from Some description to ''

And the other way around:

vagrant@asdf:~ $ graphql-inspector diff http://localhost:9002/graphql schema.graphql
✔ Field Query.example description changed from ' to Some description'

@kamilkisiela kamilkisiela added ⏳ waiting for release This issue or pull request is waiting to be released and removed ⚙️ work in progress Someone is working on it 🐞 bug Something isn't working labels Apr 8, 2020
@kamilkisiela
Copy link
Owner

@spawnia v1.30.1 could you try latest version? I checked and it works for me with GraphQL Faker

@kamilkisiela kamilkisiela added 🎙️ question Further information is requested and removed ⏳ waiting for release This issue or pull request is waiting to be released labels Apr 8, 2020
@spawnia
Copy link
Contributor Author

spawnia commented Apr 9, 2020

Version 1.30.3 does the trick, thank you.

@spawnia spawnia closed this as completed Apr 9, 2020
@kamilkisiela kamilkisiela removed the 🎙️ question Further information is requested label Apr 9, 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

No branches or pull requests

2 participants