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
I can't omit (type : $type, community : $community) from here since that would give an error. In the worst case I would have to send dummy hardcoded values.
I guess
subscriptions: [
({ viewer, type, community }) => new NewsFeedItemsAvailableSubscription({ viewer, type, community }),
]
feed the values of type and community into $input through ...subscription.getVariables(). However, how can I make them available in newItemsAvailable(type : $type, community : $community). I haven't looked into the source code of Relay so have no clue of how all this generally works.
The text was updated successfully, but these errors were encountered:
If the above isn't possible(using data from $input next to subfields), I feel the above snippets are sufficient to get an understanding of what I am trying to do here. What solution do you suggest? ${input.type} gives an error(Error: You supplied a GraphQL document that uses template substitution for an argument value, but variable substitution has not been enabled.) too. Does Relay store fields fetched using separate variables separately? If so, I think it makes sense to subscribe multiple times on the same field using different variables.
My components have query fragments of the following form:
I want to subscribe to changes in the field
newItemsAvailable
. To do so I would need the following getSubscription function:I can't omit
(type : $type, community : $community)
from here since that would give an error. In the worst case I would have to send dummy hardcoded values.I guess
and
feed the values of type and community into $input through
...subscription.getVariables()
. However, how can I make them available innewItemsAvailable(type : $type, community : $community)
. I haven't looked into the source code of Relay so have no clue of how all this generally works.The text was updated successfully, but these errors were encountered: