Skip to content

Subscription Support #577

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

Closed
yhc44 opened this issue Oct 28, 2020 · 8 comments
Closed

Subscription Support #577

yhc44 opened this issue Oct 28, 2020 · 8 comments
Assignees
Labels

Comments

@yhc44
Copy link

yhc44 commented Oct 28, 2020

Hey, it is very sad, that this project seems not being actively maintained.

I used it for some days now and sadly there are some things missing (real subscriptions, field names in queries etc.) so im switching to nodejs in my graphql microservice.

@rick-meli
Copy link

Hi, @yhc44 Seems I'm going to do the same 👎 . I really wanted my graphql microservice was built in golang. It's so sad.

@Fontinalis
Copy link
Collaborator

Hey @yhc44 and @rick-meli ,

I share your thoughts.. A while back, this was part of the reasons why I started developing a GraphQL package in Go, with a similar, but different approaches. Since then, the core implementation got into a stable phase, and the additional features are still in development, but at my company we are confident enough to use it in projects that are we are currently working on.

It has Subscriptions, Apollo Federation, field directives support, and many more features are coming, since I’m pumped to get them implemented, and personally we’ll also need them at work. So if you are still in the decision making, I would encourage you to check out the repo, see the examples, try it, check if it meet you needs and ask me any questions if you have.

rigglo/gql

@giautm
Copy link

giautm commented Nov 1, 2020

Can you give a try will gqlgen? They generate go code from GraphQL schema, in-active development and subscription supported.

@chris-ramon
Copy link
Member

Hi @yhc44! –– Thanks for giving a try to the lib and sharing your thoughts:


Hey, it is very sad, that this project seems not being actively maintained.

Actually we do try our best to actively maintain it, this is a concern that was raised in a previous issue: Going out of life? and as pointed out in that issue hopefully we can catch-up on the awesome PRs that are to be reviewed & merge:

We have many awesome contributors that were improving the library along the way, hopefully we can catch-up closing more issues and merging PRs.
Ref: #527 (comment)


I used it for some days now and sadly there are some things missing (real subscriptions, field names in queries etc.)

real subscriptions:

If you mean with real subscriptions having support for the subscribe property at the field definition level, yes this is a feature that hopefully we will be integrating soon via the PR#495.

But we do have Subscriptions support at the schema level since quite long time ago:

Subscription *Object

And here is a small working example: #49 (comment)


field names in queries

If with field name in queries your referring to aliases, we do have alias support on queries:

1

etc.

If you could expand on this would be cool.

so im switching to nodejs in my graphql microservice.

That would be a good alternative since graphql-js have the latest GraphQL Spec features because the nature of being the reference implementation.

@yhc44
Copy link
Author

yhc44 commented Nov 3, 2020

Hey @chris-ramon, thanks for your detailed answer.

With field names i mean for example

subscription {
  onCreateCluster {
    id
  }
}

I implemented your pubsub example, which is working fine. But how can i retrieve the field id in this example? I dont want to return all fields that i have on the specific object.

I just want to return

{
  id: '1337'
}

not

{
  id: '1337',
  ...allOtherFields (e.g name)
}

Sorry for my initial title btw. Was not very specific.

@yhc44 yhc44 changed the title Very sad Subscription Support Nov 3, 2020
@gerarts
Copy link

gerarts commented Apr 26, 2021

Hey @chris-ramon, do you already have an ETA for PR #495? The last real commit to that PR was almost a year ago and as far as I can tell everything seems to work as intended (also see @bhoriuchi's comment from November). Are we still waiting for something else? Thanks!

@chris-ramon
Copy link
Member

chris-ramon commented Aug 21, 2021

Subscription Support Resolved via: #495@yhc44 feel free to file a new issue if is the case in regards your question above: #577 (comment) ( You should be receiving as part of the response only the fields that your query/subscription includes. )

@kamalkech
Copy link

i guess should add new example of subscription / ws in folders example on official repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants