Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(api-graphql): return entire payload in callback #13980

Merged
merged 2 commits into from
Nov 4, 2024
Merged

Conversation

iartemiev
Copy link
Member

Description of changes

  • Include entire subscription message contents in event subscription callback argument.

Given the following incoming subscription message

{
  "id":"ca7ba14c-e71a-45bf-b121-47a578b7c162",
  "type":"data",
  "event":"{\"some\":\"data\"}"
}

Old

channel.subscribe({
  next: (data) => console.log(data);
/*
{ some: "data" }
*/
})

New

channel.subscribe({
  next: (data) => console.log(data);
/*
{
  id: "ca7ba14c-e71a-45bf-b121-47a578b7c162",
  type: "data",
  event: { some: "data" }
}
*/
})

Description of how you validated changes

Checklist

  • PR description included
  • yarn test passes
  • Unit Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

@iartemiev iartemiev requested a review from a team as a code owner November 1, 2024 15:09
@iartemiev iartemiev changed the title feat(events): return entire payload in callback feat(api-graphql): return entire payload in callback Nov 1, 2024
@iartemiev iartemiev merged commit d6eede3 into main Nov 4, 2024
31 checks passed
@iartemiev iartemiev deleted the event-payload branch November 4, 2024 15:23
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants