catalinmiron
08/23/2018, 10:01 AMApple123
08/23/2018, 10:35 AMzonofthor
08/23/2018, 12:21 PMashki
08/23/2018, 12:43 PMaroman
08/23/2018, 12:45 PMkratam
08/23/2018, 1:38 PMprisma-binding
and I need additional fields which are not requested by the original query (e.g. for custom sorting), how can I extend the info
object (the second argument of <http://ctx.db.query.xxx|ctx.db.query.xxx>
)?Jerry Jäppinen
08/23/2018, 1:48 PMJerry Jäppinen
08/23/2018, 1:48 PMJerry Jäppinen
08/23/2018, 1:49 PMuser
is a required field:Jerry Jäppinen
08/23/2018, 1:49 PMmutation CreateThing (
$title: String!,
$userId: ID!
) {
createThing (
data: {
title: $title
user: {
connect: {
id: $userId
}
}
}
) {
...Thing
}
}
Jerry Jäppinen
08/23/2018, 1:50 PM$userId
to optional, this will fail when it is omitted ("You provided an invalid argument for the where selector on User"
)Jerry Jäppinen
08/23/2018, 1:53 PMuser
in data? Can I do this dynamically? I’m reading all my queries from .graphql
files, meaning in this case I could do a workaround with just another query called CreateThingWithUser
, but that would not scale as it leads to a lot of duplication. I was also looking into directives but it seems those are only useful in defining what gets returnedmnichovcan
08/23/2018, 1:57 PMcory
08/23/2018, 1:59 PMzonofthor
08/23/2018, 2:04 PMfreder
08/23/2018, 2:12 PMPlínio Naves
08/23/2018, 2:12 PMfreder
08/23/2018, 2:13 PMphilippbosch
08/23/2018, 2:14 PMPlínio Naves
08/23/2018, 2:30 PMcatalinmiron
08/23/2018, 2:32 PMzonofthor
08/23/2018, 2:51 PMapp1
calls <https://mygraphqlserver.io:4010>
app2
calls <https://mygraphqlserver.io:4011>
...etczonofthor
08/23/2018, 2:52 PMapp1
calls <https://mygraphqlserver.io/app1:4000>
app2
calls <https://mygraphqlserver.io/app2:4000>
zonofthor
08/23/2018, 2:52 PMashki
08/23/2018, 3:09 PMversion: '3'
services:
api_01:
image: someyogaimage
restart: always
command: "yarn start"
environment:
- PRISMA_ENDPOINT=<http://prisma:4466/service1>
- PRISMA_SECRET="my-secret"
ports:
- "4000:4000"
api_02:
image: someyogaimage
restart: always
command: "yarn start"
environment:
- PRISMA_ENDPOINT=<http://prisma:4466/service2>
- PRISMA_SECRET="my-secret"
ports:
- "4000:4000"
prisma:
image: prismagraphql/prisma:1.10
restart: always
ports:
- "4466:4466"
environment:
PRISMA_CONFIG: |
port: 4466
# uncomment the next line and provide the env var PRISMA_MANAGEMENT_API_SECRET=my-secret to activate cluster security
managementApiSecret: my-secret
databases:
default:
connector: mysql
active: true
host: db
port: 3306
user: root
password: prisma
db:
image: mysql:5.7
restart: always
environment:
MYSQL_ROOT_PASSWORD: prisma
NOTE this doesn't work but it's just for you to get a sense of how it would be workingharmony
08/23/2018, 3:16 PMGorodov Maksim
08/23/2018, 4:35 PMMike
08/23/2018, 6:38 PMcory
08/23/2018, 7:26 PMcory
08/23/2018, 7:26 PM# seed.graphql
mutation {
adfdfdsd: createUser(data: { email: "<mailto:a@b.com|a@b.com>" }) { email }
jajdajdfa: createUser(data: { email: "<mailto:b@c.com|b@c.com>" }) { email }
}