Replies: 14 comments 15 replies
-
As mentioned in the documentation there's a test starter available which exposes the |
Beta Was this translation helpful? Give feedback.
-
Hi. I used the example, but I retrieved a 404 error. If I look around the code, the error is this piece of code:
Is this correct? |
Beta Was this translation helpful? Give feedback.
-
Hi! I'm trying to use the test library as I found it pretty easy and useful and I'm facing the same 404 error.. In my case I found that is related with the
annotations, if I use the
it works perfectly, I can't seem to find the reason as Anyone that knows what the problem might be? Thx! |
Beta Was this translation helpful? Give feedback.
-
This test class uses You shouldn't have to add this: @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) since that's already set on the Maybe it's a Kotlin config issue? |
Beta Was this translation helpful? Give feedback.
-
Hi! I've been trying for a while to find the problem but didn't find anything.. Reading the annotation doc I realized that It was not loading the full application context, and I need it anyway, so I ended up using the Thank you for the support! |
Beta Was this translation helpful? Give feedback.
-
Hello! I am working on building GraphQL Webflux api using graphql-kickstart-spring-boot-starter-webflux. I tried finding resources on how i could test this. Any pointers in this regard are helpful. Thanks! |
Beta Was this translation helpful? Give feedback.
-
I think i found what i am looking for. |
Beta Was this translation helpful? Give feedback.
-
I am trying the following test:
and I get the following response:
Any help is appreciated ... |
Beta Was this translation helpful? Give feedback.
-
@mustafa-qamaruddin That test class is correct. There is something wrong with the servlet, possibly due to the graphql not being available in URI/graphql |
Beta Was this translation helpful? Give feedback.
-
Thank you, I have my /graphql pointing to /api/graphql, shouldn't the test detect it automaticaly, and from debugging I think it hits /api/graphql
Also, I @graphqltest should be initializing the servlet? |
Beta Was this translation helpful? Give feedback.
-
I had the same issue. However, once I just put my test class into the same package, then it worked. |
Beta Was this translation helpful? Give feedback.
-
I had the same issue and solved it with:
Then, I can test with
|
Beta Was this translation helpful? Give feedback.
-
Adding this works for me
The test that passed are for Rest API. GraphQL tests are failing. Can anyone help? |
Beta Was this translation helpful? Give feedback.
-
Hi, you can find GraphQL Spring Boot server example here: Tests example is placed here: To run tests from IntelliJ IDEA install Kotest plugin: |
Beta Was this translation helpful? Give feedback.
-
Hello, im new in GraphQL world, I'm doing my first API with this technology and I have one doubt. It's possible with JUnit do testing for my GraphQLResolver, GraphQLMutationResolver or GraphQLQueryResolver? Or simply don't have sence doing? If is possible doing, please can you share me someone class than example?
Sorry for my bad english!
Best regards
Beta Was this translation helpful? Give feedback.
All reactions