Skip to content

feat: allow implementing interfaces in extendType #774

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

Conversation

izumin5210
Copy link
Contributor

to fix #773

Allow implementing interfaces in extendType definition

@codecov
Copy link

codecov bot commented Jan 6, 2021

Codecov Report

Merging #774 (db20e19) into main (af73f66) will increase coverage by 0.05%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #774      +/-   ##
==========================================
+ Coverage   93.78%   93.84%   +0.05%     
==========================================
  Files          46       46              
  Lines        2930     2926       -4     
  Branches      694      693       -1     
==========================================
- Hits         2748     2746       -2     
+ Misses        180      178       -2     
  Partials        2        2              

Comment on lines -909 to -914
const toExtend = this.typeExtendMap[config.name]
if (toExtend) {
toExtend.forEach((e) => {
e.definition(definitionBlock)
})
}
Copy link
Contributor Author

@izumin5210 izumin5210 Jan 6, 2021

Choose a reason for hiding this comment

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

currently, we cannot extend interface types, so it's safe(no breaking) to remove these codes
https://codesandbox.io/s/extendtype-and-interface-ysf1v?file=/src/schema/index.ts

@jasonkuhrt jasonkuhrt requested a review from tgriesser January 11, 2021 01:55
@tgriesser tgriesser changed the title fix: allow implementing interfaces in extendType feat: allow implementing interfaces in extendType Jan 20, 2021
@tgriesser tgriesser merged commit 666746c into graphql-nexus:main Jan 26, 2021
@izumin5210 izumin5210 deleted the allow-implements-in-extendtype branch May 11, 2021 09:28
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.

cannot implement interfaces in extendType definition
2 participants