Corey Lanier
04/15/2019, 8:32 PMdnbkr
04/15/2019, 10:55 PM# import * from './generated/prisma.graphql'
Invalid or unexpected token
dnbkr
04/15/2019, 10:55 PMdnbkr
04/15/2019, 11:22 PMCCBCodeMonkey
04/16/2019, 4:00 AMCCBCodeMonkey
04/16/2019, 4:01 AMCCBCodeMonkey
04/16/2019, 4:06 AMCCBCodeMonkey
04/16/2019, 4:07 AMmutation {
executeRaw(
query: "SELECT * FROM default$default.\"User\""
)
}
James
04/16/2019, 4:10 AMCCBCodeMonkey
04/16/2019, 4:12 AMJames
04/16/2019, 4:15 AMCCBCodeMonkey
04/16/2019, 4:19 AMCCBCodeMonkey
04/16/2019, 4:20 AMCCBCodeMonkey
04/16/2019, 4:20 AMCCBCodeMonkey
04/16/2019, 4:24 AMCCBCodeMonkey
04/16/2019, 4:24 AMconst createQuery = (query) => {
const returnQuery = `${query} `.replace(/"/g, '\\"').replace(/\n/g, ' ').replace(/\s+/g, ' ');
return returnQuery;
};
const executeQuery = async (query) => {
const fixedQuery = createQuery(query);
const response = await prisma.$graphql(`
mutation {
executeRaw(query: "${fixedQuery}")
}
`);
return response.executeRaw;
};
const results = await executeQuery('SELECT count("id") FROM "default$default"."YourTable" group by "yourField"');
CCBCodeMonkey
04/16/2019, 4:31 AMJames
04/16/2019, 5:46 AMCCBCodeMonkey
04/16/2019, 5:55 AMNovalis
04/16/2019, 8:33 AMrem
04/16/2019, 9:03 AMrem
04/16/2019, 9:04 AM/_admin
- the playground tries to access it as a database called "_admin"rem
04/16/2019, 10:21 AMbkstorm
04/16/2019, 10:32 AM@scalarList
when using datamodel v1.1. When I using it, it always return empty list.
I just create an new issue on github: https://github.com/prisma/datamodel-v1.1-feedback/issues/17boennemann
04/16/2019, 11:09 AMTaras Protchenko
04/16/2019, 11:20 AMWesley Rast
04/16/2019, 1:49 PMprisma deploy
fails because it can't find the Docker container running. Anyone else having trouble with the Docker container?
I've also run docker ps
and verified that the image is running correctly and on the correct port.
The instructions said to use Docker Toolbox in Windows, which is what I'm doing, but I'm seeing in the Docker documentation lots of references to "don't use this" and to use Docker Desktop instead. Is this Prisma's advice as well?emattias
04/16/2019, 1:49 PMtype ItemHierarchyNode {
id: ID!
name: String!
children: [ItemHierarchyNode!]!
}
and the root node always has id of root
. Depending on variables sent in to the graphql query children
will or will not be an empty list on the root node (with the same id=root
). This messes up apollo cache because it doesnt update the cache once root has been cached.
What is the recommended way to handle this, other than not caching at all?Zak
04/16/2019, 4:24 PMZak
04/16/2019, 4:25 PM