-
-
Notifications
You must be signed in to change notification settings - Fork 772
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
Document subscriptions #3525
Conversation
looks already very good! |
There was a problem hiding this 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 { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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 => |
There was a problem hiding this comment.
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...
b9f0c9b
to
c4e6588
Compare
abe4ad5
to
dbaae96
Compare
af8c04d
to
c63f549
Compare
Kudos, SonarCloud Quality Gate passed! |
Documents subscriptions and improves the Get Started document of HotChocolate.