It is necessary to pass the userID which enters the component from the outside via props to the variable in the USER_QUERY request. The example below does not work, how is it right to do this?

@compose( connect(({ locale, common: { gameID } }) => ({ locale, gameID })), graphql(USER_QUERY, { options: ({ userID, gameID }) => ({ userID, gameID }) }), ... }) ) 

    1 answer 1

    Like this:

      graphql<Query, OwnProps>(DATA_QUERY, { options: props => ({ variables: { id: props.id, }, }), }),