Skip to content

Conversation

joual
Copy link
Contributor

@joual joual commented Nov 3, 2020

With a schema like

type Query {
  vehicles: [Vehicle!]!
}

interface Vehicle {
  id: ID!
}

type Car implements Vehicle {
  id: ID!
  mileage: Int
}

and a query like

query { 
  vehicles { 
    id 
    ...on Car { 
      mileage 
    } 
  } 
}

I currently get a lint error because it'll say that id should also be present in the Car selection set.

This PR attempts to fix this issue. I had a problem with the types on node.parent which is why I typed it as any. Not quite sure what I should type it as to get it to work.

@changeset-bot
Copy link

changeset-bot bot commented Nov 3, 2020

⚠️ No Changeset found

Latest commit: 40257ed

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dotansimha
Copy link
Member

dotansimha commented Nov 3, 2020

Great catch, thank you @joual !
I'm working on some other fixes related to this rule, so I'll merge it and apply some fixes later (and also fix the any).

@dotansimha dotansimha merged commit bcc1746 into graphql-hive:master Nov 3, 2020
@joual
Copy link
Contributor Author

joual commented Nov 3, 2020

Thank you! I'll be watching for the release with the fix. I'm currently trying to integrate it into our tooling over at SurveyMonkey and so far it's the only blocking issue. Cheers 🍻

@dotansimha
Copy link
Member

Cool, thank you @joual . I'll cut a release today or tomorrow :D

@joual
Copy link
Contributor Author

joual commented Nov 10, 2020

Hey @dotansimha, 👋 Just wanted to send a ping to remind you about the release just in case it slipped your mind. :) If you remembered but still have other things to include that's totally fine!

@dotansimha
Copy link
Member

Oops, done :) @graphql-eslint/[email protected] @joual thanks!

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

Successfully merging this pull request may close these issues.

2 participants