dgs-framework icon indicating copy to clipboard operation
dgs-framework copied to clipboard

Refactoring how graphiql is loaded and supporting subscriptions

Open StringKe opened this issue 2 years ago • 4 comments

Pull request checklist

  • [x] Please read our contributor guide
  • [x] Consider creating a discussion on the discussion forum first
  • [x] Make sure the PR doesn't introduce backward compatibility issues
  • [ ] Make sure to have sufficient test cases

Pull Request type

  • [ ] Bugfix
  • [ ] Feature
  • [x] Refactoring (no functional changes, no api changes)
  • [ ] Build related changes
  • [ ] Other (please describe):

Changes in this PR

https://github.com/Netflix/dgs-framework/discussions/1633

Originating this discussion, I need to test the subscription in graphiql, but it doesn't seem to be supported at the moment?

After the change, graphiql will load the http and subscription endpoints from the url and use them, and parameters such as query will be serialized and displayed on the url!

When a user requests a graphiql that does not carry any endpoint parameters, it automatically adjusts to the address that does!

I'm testing the corresponding code in my own project webflux This implementation does not have any errors and can perform subscriptions.

I'm not familiar with webmvc / webflux, and I'm not a very skilled java / kotlin development engineer, so if there's anything wrong with this pr, feel free to submit changes!

Alternatives considered

None

StringKe avatar Sep 16 '23 02:09 StringKe

Thanks for the PR. I'll take a look at the PR next week. In the meantime, could you please run ./gradlew formatKotlin to address the lint errors.

srinivasankavitha avatar Sep 22 '23 23:09 srinivasankavitha

@StringKe - the tests seem to be failing with your changes. Could you please take a look at those as well when you can?

srinivasankavitha avatar Sep 26 '23 21:09 srinivasankavitha

@StringKe - the tests seem to be failing with your changes. Could you please take a look at those as well when you can?

Okay, I'm going to need to delay this for a couple days.

StringKe avatar Sep 27 '23 01:09 StringKe

Thanks, no rush at all!

srinivasankavitha avatar Sep 27 '23 18:09 srinivasankavitha