cedric
10/17/2018, 1:30 AMdivyendu
10/17/2018, 3:37 AM$raw
support yet. We hope to add it soon 🙂Fran Dios
10/17/2018, 4:07 AMprisma-binding
. About aggregation functions, only count
is implemented but support for more of them is planned: https://github.com/prisma/prisma/issues/1312cedric
10/17/2018, 12:50 PMcedric
10/17/2018, 12:50 PMconst { Prisma } = require('prisma-binding')
const prisma = new Prisma({
typeDefs: './prisma.graphql',
endpoint: '<https://localhost:4447>'
})
// A `main` function so that we can use async/await
async function main() {
// Read all users from the database and print them to the console
const result = await prisma.request(`mutation {
executeRaw(query: "SELECT 1") {
rows
}
}`)
console.log(result)
}
main().catch(e => console.error(e))
cedric
10/17/2018, 12:50 PMnode client/index.js
{ errors:
[ { GraphQLError: Cannot query field "executeRaw" on type "Mutation".
at Object.Field (/Users/cedric/src/spantree/spantree-os-primsa-sandbox/node_modules/graphql/validation/rules/FieldsOnCorrectType.js:65:31)
at Object.enter (/Users/cedric/src/spantree/spantree-os-primsa-sandbox/node_modules/graphql/language/visitor.js:324:29)
at Object.enter (/Users/cedric/src/spantree/spantree-os-primsa-sandbox/node_modules/graphql/language/visitor.js:366:25)
at visit (/Users/cedric/src/spantree/spantree-os-primsa-sandbox/node_modules/graphql/language/visitor.js:254:26)
at visitUsingRules (/Users/cedric/src/spantree/spantree-os-primsa-sandbox/node_modules/graphql/validation/validate.js:74:22)
at validate (/Users/cedric/src/spantree/spantree-os-primsa-sandbox/node_modules/graphql/validation/validate.js:59:10)
at graphqlImpl (/Users/cedric/src/spantree/spantree-os-primsa-sandbox/node_modules/graphql/graphql.js:106:50)
at /Users/cedric/src/spantree/spantree-os-primsa-sandbox/node_modules/graphql/graphql.js:66:223
at new Promise (<anonymous>)
at Object.graphql (/Users/cedric/src/spantree/spantree-os-primsa-sandbox/node_modules/graphql/graphql.js:63:10)
message: 'Cannot query field "executeRaw" on type "Mutation".',
locations: [Array],
path: undefined } ] }
divyendu
10/17/2018, 12:58 PMcedric
10/17/2018, 1:30 PMcedric
10/17/2018, 1:46 PMcedric
10/17/2018, 1:46 PMversion: '3'
services:
prisma:
image: prismagraphql/prisma:1.18
restart: always
ports:
- "4466:4466"
environment:
PRISMA_CONFIG: |
port: 4466
databases:
default:
connector: mysql
host: db
port: 3306
user: root
password: prisma
migrations: true
rawAcess: true
db:
image: mysql:5.7
restart: always
environment:
MYSQL_ROOT_PASSWORD: prisma
volumes:
- mysql:/var/lib/mysql
# postgres:
# image: postgres:10.5
# restart: always
# environment:
# POSTGRES_USER: prisma
# POSTGRES_PASSWORD: prisma
# volumes:
# - postgres:/var/lib/postgresql/data
volumes:
# postgres:
mysql:
cedric
10/17/2018, 1:46 PMcedric
10/17/2018, 1:52 PMrawAcess
instead of rawAccess
cedric
10/17/2018, 1:55 PMcedric
10/17/2018, 1:55 PMcedric
10/17/2018, 1:55 PMdivyendu
10/17/2018, 2:47 PMcedric
10/17/2018, 2:47 PMdivyendu
10/17/2018, 3:00 PMdivyendu
10/17/2018, 3:00 PMcedric
10/17/2018, 3:01 PMcedric
10/17/2018, 3:01 PMcedric
10/17/2018, 3:12 PMcedric
10/17/2018, 3:12 PMcedric
10/17/2018, 3:12 PMcedric
10/17/2018, 3:22 PMdivyendu
10/17/2018, 3:29 PMcedric
10/17/2018, 3:29 PMcedric
10/17/2018, 3:29 PMcedric
10/17/2018, 3:29 PMcedric
10/17/2018, 3:31 PMdivyendu
10/17/2018, 3:31 PMdivyendu
10/17/2018, 3:31 PMcedric
10/17/2018, 3:33 PMcedric
10/17/2018, 3:33 PMcedric
10/17/2018, 3:33 PMcedric
10/17/2018, 3:34 PMcedric
10/17/2018, 3:34 PMdivyendu
10/17/2018, 3:36 PMservice@stage
, let me look up what it is in postgres!cedric
10/17/2018, 3:36 PMdivyendu
10/17/2018, 3:39 PMdivyendu
10/17/2018, 3:39 PMcedric
10/17/2018, 3:39 PMcedric
10/17/2018, 3:39 PMdivyendu
10/17/2018, 3:39 PMcedric
10/17/2018, 3:40 PMdivyendu
10/17/2018, 3:41 PMnilan
10/19/2018, 11:25 AMcedric
10/20/2018, 1:46 AMcedric
10/20/2018, 1:47 AM