Last active
December 19, 2021 18:27
-
-
Save jagdishlove/501ead645b13ca33f25094a992c4e365 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const GET_FILES = gql` | |
query GetFiles { | |
files:files(where:{user_id:{_eq:439}}) { | |
...File | |
} | |
} | |
${FRAGMENTS} | |
` | |
export const GET_FILES = gql` | |
query GetFiles($userId:Int!) { | |
files:files(where:{user_id:{_eq:$userId}}) { | |
...File | |
} | |
} | |
${FRAGMENTS} | |
` | |
<Query query={GET_FILES} | |
// variables={{user_id: 439 }} | |
variables={{userId:student.id}} | |
fetchPolicy={'cache-and-network'}> | |
{({ data, loading, error, refetch }) => { | |
console.log("new Data",data) | |
refetchRef.current = refetch; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment