Hi hope you doing well !
I cant seam to figure how to use environments variables.
const response = await graphql.query({
query: `query {
databasesGetDocument(
databaseId: "social"
collectionId: "cards"
documentId: $documentId
) {
data
_id
_collectionId
_databaseId
_createdAt
_updatedAt
_permissions
}
}`,
variables: {
documentId: params.cardId,
},
});
Thi give me the following GraphQl error :
Variable "$documentId" is not defined.
params.cardId is correctly set
can you see this once and let me know if this helps? https://appwrite.io/docs/graphql#sdk-usage
Thanks, I already saw it. But i dont see my mistake :/
You need to add GetDocument($documentId: String)
const response = await graphql.query({
query: `query GetDocument($documentId: String!) {
databasesGetDocument(
databaseId: "social"
collectionId: "cards"
documentId: $documentId
) {
data
_id
_collectionId
_databaseId
_createdAt
_updatedAt
_permissions
}
}`,
variables: {
documentId: params.cardId,
},
});```
Can you try it once @Luky ?
I ended by not using qraphQl i moved to it trying to do join like queries :/
But this doesn't seem possible
Thanks for your help !
Recommended threads
- Collections list not showing up when try...
I'm trying to create new relationship attribute but both one way and two way relationship is not showing up collections list to connect with my relationship att...
- I have try to use the appwrite in to the...
Invalid Origin. Register your new client (oailedjdbkhlkakmnnapoonllbnfmfij) as a new Web (Chrome Extension) platform on your project console dashboard
- Paused project can't activate
I have failed to reactivate one my projects which had been paused