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

fix(graphql) #363

Closed
wants to merge 1 commit into from
Closed

fix(graphql) #363

wants to merge 1 commit into from

Conversation

bgdnp
Copy link

@bgdnp bgdnp commented Aug 2, 2019

Fixed auto generated schema on serverless

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

[*] Bugfix
[ ] 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?

Currently nest doesn't work with 'code first' graphql approach on serverless platform. It fails with this output

[Nest] 4650   - 08/02/2019, 11:27 PM   [NestFactory] Starting Nest application... +610988ms
[Nest] 4650   - 08/02/2019, 11:27 PM   [InstanceLoader] AppModule dependencies initialized +7ms
[Nest] 4650   - 08/02/2019, 11:27 PM   [InstanceLoader] ConfigModule dependencies initialized +0ms
[Nest] 4650   - 08/02/2019, 11:27 PM   [InstanceLoader] ResolversModule dependencies initialized +1ms
[Nest] 4650   - 08/02/2019, 11:27 PM   [InstanceLoader] UserModule dependencies initialized +0ms
[Nest] 4650   - 08/02/2019, 11:27 PM   [InstanceLoader] GraphQLModule dependencies initialized +1ms
Serverless: Failure: Schema must contain uniquely named types but contains multiple types named "User".

Issue is described here

Issue Number: N/A

What is the new behavior?

Assigning autoGeneratedSchema to a class property instead of variable seems to fix the problem on serverless. Behavior without serverless is unchanged.

Does this PR introduce a breaking change?

[ ] Yes
[*] No

Other information

Fixed auto generated schema on serverless
@bgdnp bgdnp closed this Aug 3, 2019
@lock
Copy link

lock bot commented Apr 25, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant