Skip to content

[RFC] Implementations of interfaces can include additional field args #110

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

Merged
merged 1 commit into from
Oct 22, 2015

Conversation

leebyron
Copy link
Collaborator

This proposal extends the definition of a legal implementation of an interface to allow for additional field arguments, provided that those arguments are not required.

interface I {
  field(arg: String): String
}

# Previously illegal, now legal
type T implements I {
  field(arg: String, other: String): String
}

# Still illegal
type T implements I {
  field(arg: String, other: String!): String
}

# because this query validates but could throw "required argument other" at runtime
some_interface { field(arg: "foo") }

…ments

This proposal extends the definition of a legal implementation of an interface to allow for additional field arguments, provided that those arguments are not required.

```
interface I {
  field(arg: String): String
}

type T implements I {
  field(arg: String, other: String): String
}

type T implements I {
  field(arg: String, other String!): String
}
```
leebyron added a commit to graphql/graphql-js that referenced this pull request Oct 21, 2015
@leebyron leebyron changed the title [RFC] Implementations of interfaces can include additional field argu… [RFC] Implementations of interfaces can include additional field args Oct 21, 2015
leebyron added a commit that referenced this pull request Oct 22, 2015
[RFC] Implementations of interfaces can include additional field args
@leebyron leebyron merged commit 570e1ee into master Oct 22, 2015
@leebyron leebyron deleted the moreargs branch October 22, 2015 05:50
sogko added a commit to sogko/graphql that referenced this pull request Apr 6, 2016
Implements graphql/graphql-spec#110

Commit:
08ffd091b78c594d92d308970f986cd9258f0596 [08ffd09]
Parents:
defbb03617
Author:
Lee Byron <[email protected]>
Date:
22 October 2015 at 3:38:45 AM SGT
Commit Date:
22 October 2015 at 3:38:47 AM SGT

---

Allowed `graphql.Interface` to accept thunked Fields
mattstern31 pushed a commit to mattstern31/graphql-gqllero-repository that referenced this pull request Nov 10, 2022
Implements graphql/graphql-spec#110

Commit:
08ffd091b78c594d92d308970f986cd9258f0596 [08ffd09]
Parents:
defbb03617
Author:
Lee Byron <[email protected]>
Date:
22 October 2015 at 3:38:45 AM SGT
Commit Date:
22 October 2015 at 3:38:47 AM SGT

---

Allowed `graphql.Interface` to accept thunked Fields
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