This repository has been archived by the owner on Jul 10, 2019. It is now read-only.
This repository has been archived by the owner on Jul 10, 2019. It is now read-only.
Open
Description
I have simple Query with variable:
<Query
pollInterval={2000}
variables={{ programId: activeProgram }}
query={FETCH_PROGRAM_EDITOR}
>...
with query:
const FETCH_PROGRAM_EDITOR = gql`
query ProgramEditor($programId: String!) {
program(_id: $programId) {
_id
name
desc
}
}`
activeProgram
is coming from local state (cache). Is there a way to use local state variables directly in query ? How to pass local state to query variable ?
Metadata
Assignees
Labels
No labels