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

Add support for subscriptions #11

Merged
merged 8 commits into from
Feb 17, 2018
Merged

Add support for subscriptions #11

merged 8 commits into from
Feb 17, 2018

Conversation

vektah
Copy link
Collaborator

@vektah vektah commented Feb 17, 2018

type Subscription {
    messageAdded(roomName: String!): Message!
}

will generate resolver methods that return a channel:

Subscription_messageAdded(ctx context.Context, roomName string) (<-chan Message, error)

these resolvers are expected to stop returning results when context is done.

I've also included an example apollo app that uses subscriptions:
subscriptions

Closes Subscriptions

@blasterpistol
Copy link

You are gem! Thank you for your amazing work! 🎉

@vektah vektah merged commit c8c2e40 into master Feb 17, 2018
@vektah vektah deleted the subscriptions branch February 17, 2018 22:42
cgxxv referenced this pull request in cgxxv/gqlgen Mar 25, 2022
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.

Subscriptions
2 participants