Skip to content

Conversation

@thekuom
Copy link
Contributor

@thekuom thekuom commented Apr 12, 2020

Addresses #501

I didn't find a place where this type of stuff is tested. Please let me know if I need to add another test somewhere.

There are a few breaking changes:
BREAKING CHANGE: juniper::http::graphiql::graphiql_source now requires
a second parameter

BREAKING CHANGE: juniper_hyper::graphiql now requires
a second parameter

BREAKING CHANGE: juniper_iron::GraphiQLHandler::new now requires
a second parameter

BREAKING CHANGE: juniper_rocket::graphiql_source now requires
a second parameter

BREAKING CHANGE: juniper_warp::graphiql_filter now requires
a second parameter

Here is a gif of it working adapting the example in examples/warp_subscriptions/src/main.rs.
graphiql_subscriptions

This was done by adding the following lines to examples/warp_subscriptions/src/main.rs:

    .or(warp::get()
        .and(warp::path("graphiql"))
        .and(graphiql_filter("/graphql", Some("ws://localhost:8080/subscriptions"))))

thekuom added 2 commits April 12, 2020 15:28
Addresses graphql-rust#501

BREAKING CHANGE: `juniper::http::graphiql::graphiql_source` now requires
a second parameter

BREAKING CHANGE: `juniper_hyper::graphiql` now requires
a second parameter

BREAKING CHANGE: `juniper_iron::GraphiQLHandler::new` now requires
a second parameter

BREAKING CHANGE: `juniper_rocket::graphiql_source` now requires
a second parameter

BREAKING CHANGE: `juniper_warp::graphiql_filter` now requires
a second parameter
Copy link
Member

@LegNeato LegNeato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thank you so much for the PR and adding a test! 🍻

@LegNeato LegNeato merged commit 47f7ffa into graphql-rust:master Apr 13, 2020
@thekuom thekuom deleted the 501-graphiql-subscriptions branch April 13, 2020 05:17
jmpunkt pushed a commit to jmpunkt/juniper that referenced this pull request Apr 14, 2020
* Add subscriptions support on GraphiQL

Addresses graphql-rust#501

BREAKING CHANGE: `juniper::http::graphiql::graphiql_source` now requires
a second parameter

BREAKING CHANGE: `juniper_hyper::graphiql` now requires
a second parameter

BREAKING CHANGE: `juniper_iron::GraphiQLHandler::new` now requires
a second parameter

BREAKING CHANGE: `juniper_rocket::graphiql_source` now requires
a second parameter

BREAKING CHANGE: `juniper_warp::graphiql_filter` now requires
a second parameter

* Add test where graphiql subscriptions endpoint is not None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants