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

Graphiql fetcher observable for subscriptions #222

Closed
rogchap opened this issue Nov 24, 2016 · 10 comments
Closed

Graphiql fetcher observable for subscriptions #222

rogchap opened this issue Nov 24, 2016 · 10 comments

Comments

@rogchap
Copy link

rogchap commented Nov 24, 2016

Currently only uses the fetch API, but would be great to have graphiql's fetcher to return an Observable to support testing subscriptions.
Details here: graphql/graphiql#104

Hoping to put a PR together, but want to get this documented in-case someone beats me to it 😄

@DxCx
Copy link
Contributor

DxCx commented Nov 24, 2016

For which transport? I have it already implemented for websocket...

@rogchap
Copy link
Author

rogchap commented Nov 25, 2016

@DxCx where have you implemented? Would be great to take a look. Couldn't find anything in the source here.

@DxCx
Copy link
Contributor

DxCx commented Nov 25, 2016

Well i was working to achieve subscriptions using observables on server as well. (Resolvers returns observable, instead of manager)

https://github.com/DxCx/apollo-server/blob/rxjs-with-ws/src/modules/renderGraphiQL.ts#L39

Please note that my transport is full graphql over websocket and not the same as websocket protocol for subscriptions that is used today

@helfer
Copy link
Contributor

helfer commented Dec 13, 2016

@rogchap I'm not sure if this issue has anything to do with graphql-server. I think graphiql would be a better place for it, but as far as I know fetch can already return an observable there.

@rogchap
Copy link
Author

rogchap commented Dec 13, 2016

@helfer I think that graphiql is fine and more to do with how we implement graphQLFetcher:

https://github.com/apollostack/graphql-server/blob/master/packages/graphql-server-module-graphiql/src/renderGraphiQL.ts#L104

Maybe there's more to it?

@DxCx
Copy link
Contributor

DxCx commented Dec 13, 2016

yes. Graphiql supports observables.
a fetch function that returns observable should be provided.

@helfer
Copy link
Contributor

helfer commented Dec 13, 2016

@rogchap indeed, you're right! Looking forward to that PR 😉

@laxgoalie392
Copy link

any update on this?

@DxCx
Copy link
Contributor

DxCx commented Jan 24, 2017

I've started working on a proper websocket interface design (#272).
once this will be supported i'll probably submit my renderGraphiql patch to support Observables over websocket

@helfer
Copy link
Contributor

helfer commented Jun 28, 2017

I think @Urigo's solution will do for now.

@helfer helfer closed this as completed Jun 28, 2017
trevor-scheer pushed a commit that referenced this issue May 6, 2020
* chore(deps): update dependency prettier to v1.18.2

* Apply the same Prettier changes that were applied to Apollo Server

For more information see:

55312289116d

* Introduce an `.editorconfig`.

Commit message mostly lifted from 29e563df544.

Follow up on c743c8584d20ac2c74cacf8fee7fa6bd, which removed
Prettier, with some simple rules in a format that's understood by most
editors and some opinionated code formatters (like Prettier).

This should help keep less obvious things - like tabs vs spaces and CRLF vs
LF - from working their way into the codebase, but stops short of making
more destructive formatting changes.

* Allow destructive formatting forced by an update to `prettier`.
trevor-scheer pushed a commit that referenced this issue May 12, 2020
* chore(deps): update dependency prettier to v1.18.2

* Apply the same Prettier changes that were applied to Apollo Server

For more information see:

55312289116d

* Introduce an `.editorconfig`.

Commit message mostly lifted from 29e563df544.

Follow up on c743c8584d20ac2c74cacf8fee7fa6bd, which removed
Prettier, with some simple rules in a format that's understood by most
editors and some opinionated code formatters (like Prettier).

This should help keep less obvious things - like tabs vs spaces and CRLF vs
LF - from working their way into the codebase, but stops short of making
more destructive formatting changes.

* Allow destructive formatting forced by an update to `prettier`.
trevor-scheer pushed a commit that referenced this issue May 14, 2020
* chore(deps): update dependency prettier to v1.18.2

* Apply the same Prettier changes that were applied to Apollo Server

For more information see:

55312289116d

* Introduce an `.editorconfig`.

Commit message mostly lifted from 29e563df544.

Follow up on c743c8584d20ac2c74cacf8fee7fa6bd, which removed
Prettier, with some simple rules in a format that's understood by most
editors and some opinionated code formatters (like Prettier).

This should help keep less obvious things - like tabs vs spaces and CRLF vs
LF - from working their way into the codebase, but stops short of making
more destructive formatting changes.

* Allow destructive formatting forced by an update to `prettier`.
trevor-scheer pushed a commit that referenced this issue May 14, 2020
* chore(deps): update dependency prettier to v1.18.2

* Apply the same Prettier changes that were applied to Apollo Server

For more information see:

55312289116d

* Introduce an `.editorconfig`.

Commit message mostly lifted from 29e563df544.

Follow up on c743c8584d20ac2c74cacf8fee7fa6bd, which removed
Prettier, with some simple rules in a format that's understood by most
editors and some opinionated code formatters (like Prettier).

This should help keep less obvious things - like tabs vs spaces and CRLF vs
LF - from working their way into the codebase, but stops short of making
more destructive formatting changes.

* Allow destructive formatting forced by an update to `prettier`.
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants