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

Improve documentation around samples for reactive based slice testing GraphQL controller #549

Closed
deepakemani-maersk opened this issue Nov 29, 2022 · 5 comments
Labels
in: test Issues related to the test module type: documentation A documentation task

Comments

@deepakemani-maersk
Copy link

hi,

We are trying to do the slice test for a GraphQL controller in a reactive style using @graphqltest.

We neither found full documentation for the same in (https://docs.spring.io/spring-graphql/docs/current/reference/html/#testing-httpgraphqltester) nor examples in the repo (https://github.com/spring-projects/spring-graphql/)

The samples link is broken mentioned in the docs: https://github.com/spring-projects/spring-graphql/tree/main/samples

@rstoyanchev : Can you please help to add the missing relevant documentation for HTTP based reactive tests and in samples repo?

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Nov 29, 2022
@bclozel
Copy link
Member

bclozel commented Nov 29, 2022

Thanks for reaching out @deepakemani-maersk , we moved this documentation back to Spring Boot with the auto-configuration, where it belongs.

You can find this documentation in Spring Boot 2.7.x reference documentation - it turns out I did a poor job of reinstating it in Spring Boot 3.0 (see spring-projects/spring-boot#33407) but it should be back in a few minutes here for the next version.

As for the sample projects present on our 1.0.x branch, they're far from ideal and server mostly as integration tests. We're working on improving the situation in #208. I hope this answers your questions!

@bclozel bclozel closed this as not planned Won't fix, can't repro, duplicate, stale Nov 29, 2022
@bclozel bclozel added status: invalid An issue that we don't feel is valid for: external-project Needs a change in external project and removed status: waiting-for-triage An issue we've not yet triaged labels Nov 29, 2022
@rstoyanchev
Copy link
Contributor

Thanks for raising this!

I should start by mentioning the samples are in the process of being replaced, see #208, and were recently dropped from the main branch, so they are now only in the 1.0.x branch. The docs were updated recently with 0baceda so the latest snapshot points correctly to the 1.0.x branch.

You're right we have a documentation gap. Our own reference here is focused mainly on the testing API, but in fact what most applications will use is the Boot testing support. There is no mention of slice tests and nothing that shows the different options from a Boot perspective.

That said, a slice test is meant to be quite isolated and focused, so I'm wondering is there anything in those tests that actually depends on doing this over HTTP in particular? It would make sense that such tests don't really care about the transport.

Beyond that, I'm wondering how we could improve the docs? One option would be to link from our reference to the appropriate section in the Boot documentation, but I don't see anything suitable to link to. Nothing about @GraphQlTest, nor @AutoConfigureGraphQlTester, nor any transport specific options. @bclozel maybe is an improvement to be made in the Boot reference and would that give us a natural place to link to? Alternatively we could consider summarizing all that in our reference docs here, but still it seems like this should be somehow present in the Boot reference as well.

@bclozel
Copy link
Member

bclozel commented Nov 29, 2022

Yes, there's a gap in our docs - reopening this issue to address that.

@bclozel bclozel reopened this Nov 29, 2022
@bclozel bclozel added type: documentation A documentation task in: test Issues related to the test module and removed status: invalid An issue that we don't feel is valid for: external-project Needs a change in external project labels Nov 29, 2022
@rstoyanchev
Copy link
Contributor

Oh, I see now the section on GraphQL testing in Boot 2.7 looks much more complete. @deepakemani-maersk, please have a look at the link the Brian provided above and let us know if you have further feedback.

Beyond that, I agree we can improve the docs in the test chapter here as well to link to Boot.

@deepakemani-maersk
Copy link
Author

Thanks @bclozel, @rstoyanchev for pointing the right location and correcting them.

@bclozel bclozel added this to the 1.2 Backlog milestone Dec 9, 2022
@rstoyanchev rstoyanchev closed this as not planned Won't fix, can't repro, duplicate, stale Apr 27, 2023
@rstoyanchev rstoyanchev removed this from the 1.2 Backlog milestone Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: test Issues related to the test module type: documentation A documentation task
Projects
None yet
Development

No branches or pull requests

4 participants