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

GraphQL Federation - typedefs merged with typePaths #678

Merged
merged 1 commit into from
Apr 16, 2020
Merged

GraphQL Federation - typedefs merged with typePaths #678

merged 1 commit into from
Apr 16, 2020

Conversation

ludorenzetti
Copy link
Contributor

PR Checklist

Extends GraphQL Federation module to use the typeDefs in addition to typePaths. The feature is already available in NestJS GraphQL base module.

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Other... Please describe:

What is the current behavior?

const myTypeDefs = gql`
 
extend type Query {
    ...
}

`

GraphQLFederationModule.forRoot({
    typePaths: ['./**/*.graphql'],
    typeDefs: [myTypeDefs] // Override by typePaths
})

What is the new behavior?

const myTypeDefs = gql`
 
extend type Query {
    ...
}

`

GraphQLFederationModule.forRoot({
    typePaths: ['./**/*.graphql'],
    typeDefs: [myTypeDefs] // Merged with typePaths
})

Does this PR introduce a breaking change?

[ ] Yes
[x ] No

Other information

@ludorenzetti ludorenzetti changed the title Feat federation extend typedefs GraphQL Federation - typedefs merged with typePaths Mar 18, 2020
Allows the use of typeDefs in addition to typePaths in NestJS GraphQL Federation module.
This feature is already available for the NestJS GraphQL module.
@kamilmysliwiec
Copy link
Member

Thanks!

@kamilmysliwiec kamilmysliwiec merged commit 65e4a3d into nestjs:master Apr 16, 2020
@ludorenzetti ludorenzetti deleted the feat-federation-extend-typedefs branch April 16, 2020 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants