You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for releasing this awesome library. I am looking for a way to generate graphql response payload from raw data.
What am doing is to take raw data from database and publish this data to subscribers via graphql subscription websocket. I have a schema like:
type Message {
msg: String!
id: ID!
topic: String!
}
type Mutation {
sendChat(topic: String!, message: String!): ID!
}
type Query {
getChat(id: ID!): String!
}
type Subscription {
# Subscribe to events on the given topic.
event(
# Name of the topic to subscribe to.
on: String!
): Message!
}
when there is a need to publish Message data to subscribers, I will need to convert the raw data: { event: { msg: 'hello', topic: 'xxxx' } } to a payload the Apollo client expects.
Is there a way I can do that by using this library? The payload needs to include the __typename as well.
The text was updated successfully, but these errors were encountered:
Thanks for releasing this awesome library. I am looking for a way to generate graphql response payload from raw data.
What am doing is to take raw data from database and publish this data to subscribers via graphql subscription websocket. I have a schema like:
when there is a need to publish
Message
data to subscribers, I will need to convert the raw data:{ event: { msg: 'hello', topic: 'xxxx' } }
to a payload the Apollo client expects.Is there a way I can do that by using this library? The payload needs to include the
__typename
as well.The text was updated successfully, but these errors were encountered: