Replies: 14 comments 15 replies
|
As mentioned in the documentation there's a test starter available which exposes the |
|
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? |
|
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! |
|
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? |
|
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! |
|
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! |
|
I think i found what i am looking for. |
|
I am trying the following test: and I get the following response: Any help is appreciated ... |
|
@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 |
|
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? |
|
I had the same issue. However, once I just put my test class into the same package, then it worked. |
|
I had the same issue and solved it with: Then, I can test with
|
|
Adding this works for me The test that passed are for Rest API. GraphQL tests are failing. Can anyone help? |
|
Hi, you can find GraphQL Spring Boot server example here: Tests example is placed here: To run tests from IntelliJ IDEA install Kotest plugin: |
Uh oh!
There was an error while loading. Please reload this page.
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
All reactions