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

Document subscriptions #3525

Merged
merged 16 commits into from
Apr 22, 2021
Merged

Document subscriptions #3525

merged 16 commits into from
Apr 22, 2021

Conversation

tobias-tengler
Copy link
Collaborator

@tobias-tengler tobias-tengler commented Apr 17, 2021

Documents subscriptions and improves the Get Started document of HotChocolate.

@tobias-tengler tobias-tengler added the 📚 documentation This issue is about working on our documentation. label Apr 17, 2021
@michaelstaib
Copy link
Member

looks already very good!

@tobias-tengler tobias-tengler changed the title Update HotChocolate 'Get Started' document Document subscriptions and reword some other parts Apr 18, 2021
Copy link
Collaborator Author

@tobias-tengler tobias-tengler left a comment

Choose a reason for hiding this comment

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

Have I forgotten anything important, that's relevant for subscriptions?

addBook(input: BookInput): Book
}
type BookInput {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think we should showcase how we would bind the BookInput to the Book CLR type? I tried BindComplexType<Book>(c => c.To("BookInput")) but had no success.

How would I do it in this case?

Copy link
Member

Choose a reason for hiding this comment

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

I will check.

.Field("onBookAdded")
.Type<PersonType>()
.Resolve(context => context.GetEventMessage<Person>())
.Subscribe(async context =>
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This code works, but is this how you would do it? I haven't used subscriptions like this before...

@tobias-tengler tobias-tengler marked this pull request as ready for review April 18, 2021 14:35
@tobias-tengler tobias-tengler force-pushed the tte/update-hc-get-started branch from b9f0c9b to c4e6588 Compare April 19, 2021 16:37
@tobias-tengler tobias-tengler changed the title Document subscriptions and reword some other parts Document subscriptions Apr 20, 2021
@tobias-tengler tobias-tengler force-pushed the tte/update-hc-get-started branch from abe4ad5 to dbaae96 Compare April 20, 2021 06:43
@tobias-tengler tobias-tengler force-pushed the tte/update-hc-get-started branch from af8c04d to c63f549 Compare April 21, 2021 19:46
@michaelstaib michaelstaib self-requested a review April 22, 2021 19:29
@michaelstaib michaelstaib merged commit 1de46c1 into main Apr 22, 2021
@michaelstaib michaelstaib deleted the tte/update-hc-get-started branch April 22, 2021 21:26
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📚 documentation This issue is about working on our documentation. 🌶️ hot chocolate 🌶️ website
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants