question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Does not support interfaces implementing other interfaces

See original GitHub issue

The latest version of the spec allows you to have an interface extend another interface. This feature was also added to version 15 of graphql.

The example provided in the spec would allow you to do something like

interface Node {
  id: ID!
}

interface Resource implements Node {
  id: ID!
  url: String
}

interface Image implements Resource & Node {
  id: ID!
  url: String
  thumbnail: String
}

If you were to run the linter on a schema containing this, you will receive an error:

SyntaxError: Syntax Error: Unexpected Name “implements”

Perhaps of note is that this project upgraded to V15 not too long ago, but I suppose the linting of this new feature wasn’t something that came along for free with the upgrade.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
mobereggercommented, May 15, 2020

Gonna close this because I can’t reproduce it and don’t want to blame this project for the issue I am having. If I figure out more details, I will reopen with a proper repro.

1reaction
mobereggercommented, May 11, 2020

So the project I am seeing this happen in is definitely using version 0.4.0.

graphql-schema-linter --version
0.4.0

I tried making a smaller repo to show the issue, but can’t actually reproduce it. No idea what’s going on. Only differences that are obvious to me:

  • The project it doesn’t work in has a config file with some rules disabled (nothing that looks like it would disable an “interfaces can extend other interfaces” rule, though)
  • The project it doesn’t work in uses the lint-staged setup (it’s on the git commit I see the issue)
  • The project it doesn’t work in has the schema spread over multiple files

I’m trying to make a repo with just a single .graphql file, but can’t reproduce. Unfortunately, I can’t share the project with the issue.

I’ll keep trying, but it looks like the problem is unique to us right now 😦

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why an interface cannot implement another interface in Java?
An interface can extend any number of interfaces but one interface cannot implement another interface, because if any interface is ...
Read more >
java - Why an interface can not implement another interface?
Implements denotes defining an implementation for the methods of an interface. However interfaces have no implementation so that's not possible.
Read more >
Can an interface implement another interface? - Quora
An interface can extend any number of interfaces. Still, one interface cannot implement another interface because if any interface is implemented, the methods ......
Read more >
Suggestion: Allow interfaces to "implement" (vs extend) other ...
It is very common for one interface to be an "extension" of another, but the "extends" keyword is not a universal way to...
Read more >
Interfaces
An abstract method is a method that does not have an implementation. Essentially, the interface defines the behavior a class must support, and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found