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

bug: unmapped fields after version upgrade when using dgs.graphql.schema-locations #1885

Closed
stefan-kueenzi opened this issue Apr 17, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@stefan-kueenzi
Copy link

stefan-kueenzi commented Apr 17, 2024

Please read our contributor guide before
creating an issue.

Expected behavior

There are no unmapped fields in the GraphQL schema inspection

Actual behavior

All queries and mutation are logged as unmapped fields.

Steps to reproduce

Create a new repository with spring-boot 3.2.4 and dgs-framework 8.55 with the following files
image

When the test.graphqls file is in a folder called graphql and the following parameter is used:
dgs.graphql.schema-locations=classpath*:graphql/**/*.graphql*
We have the following logs on startup
'''
2024-04-17T22:40:39.784+02:00 INFO 29856 --- [dgsissue] [ main] efaultSchemaResourceGraphQlSourceBuilder : Loaded 1 resource(s) in the GraphQL schema.
2024-04-17T22:40:40.329+02:00 INFO 29856 --- [dgsissue] [ main] o.s.b.a.g.GraphQlAutoConfiguration : GraphQL schema inspection:
Unmapped fields: {Query=[currentUserProfile]}
Unmapped registrations: {}
Skipped types: []
'''

After renaming the folder to schema and removing the parameter dgs.graphql.schema-locations everything works fine

We tried to upgraded DGS from 7.2.0 to 8.5.5 and spring-boot from 3.1.3 to 3.2.4, after which the issue occurred. The setup worked fine before.

Test repository:
https://github.com/stefan-kueenzi/dgsissue

@stefan-kueenzi stefan-kueenzi added the bug Something isn't working label Apr 17, 2024
@paulbakker
Copy link
Collaborator

During the upgrade you also switched to the Spring GraphQL integration, right?

@stefan-kueenzi
Copy link
Author

No we only changed the version. There was no switch to Spring GraphQL integration.
I uploaded my sample project. I hope it's not my mistake 😁

https://github.com/stefan-kueenzi/dgsissue

@paulbakker
Copy link
Collaborator

Thanks for sharing the repo, that made things easy.

Your dependencies were incorrect, you actually had dependencies on Spring GraphQL directly (not even the dgs integration).

I created a PR on your repo, it works with that set of dependencies. stefan-kueenzi/dgsissue#1

@stefan-kueenzi
Copy link
Author

Thanks a lot for your quick help! I've changed it in my repository and it works fine like that. So I guess the incorrect dependencies worked with the older version and doesn't anymore. I hope the wrong bug report at least helps somebody else who has the same issue 😁

@paulbakker
Copy link
Collaborator

paulbakker commented Apr 18, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants