aperk
05/08/2018, 9:39 PMaperk
05/08/2018, 9:39 PMprisma-init
directory, though the 3 files: docker-compose.yml
, prisma.yml
, and datamodel.graphql
are there. pls see https://i.imgur.com/V5YhIro.png▾
siyfion
05/08/2018, 10:21 PMsiyfion
05/08/2018, 10:21 PMryan
05/08/2018, 11:18 PMmichal
05/09/2018, 4:26 AMJim
05/09/2018, 5:59 AMtype Location {
id: ID! @unique
name: String!
users: [User!]!
}
type User {
id: ID! @unique
name: String!
location: Location
}
Im displaying the users at each location:
export const LOCATION_QUERY = gql`
query LocationQuery($machineName: String!) {
location(machineName: $machineName) {
id
name
machineName
users {
id
}
}
}
`;
When a user joins a location the previous query gets updated automatically:
const JOIN_LOCATION = gql`
mutation joinLocation($userId: ID!, $locationMachine: String!) {
joinLocation(userId: $userId, locationMachine: $locationMachine) {
id
location {
id
users {
id
}
}
}
}
`;
But when they leave a location the query doesnt update:
const LEAVE_LOCATION = gql`
mutation leaveLocation($userId: ID!) {
leaveLocation(userId: $userId) {
id
location {
id
users {
id
}
}
}
}
`;
I think this is because the location field returns emptry so Apollo doesnt know that the number of users has changed. Is there an elegant solution to this? I could manually write to the store but I thoguth id check if there was a better way first.lawjolla
05/09/2018, 6:21 AM# prisma.yml
# ...
hooks:
post-deploy:
- echo "Deployment finished"
- graphql get-schema --project prisma
- graphql prepare
with
#. .graphqlconfig.yml
#...
prisma:
schemaPath: src/generated/prisma.graphql
extensions:
prisma: database/prisma.yml
prepare-binding:
output: src/generated/prisma.ts
generator: prisma-ts
does not generate a new schema at src/generated/prisma.graphql on prisma deploy
. What am I missing?pettanko
05/09/2018, 7:38 AMuser
05/09/2018, 7:40 AMhuv1k
05/09/2018, 7:45 AMJim
05/09/2018, 7:56 AMTatsuyuki Ishi
05/09/2018, 8:54 AMrein
05/09/2018, 9:23 AMpettanko
05/09/2018, 9:37 AMSimskii
05/09/2018, 11:06 AMMoritz
05/09/2018, 11:07 AMcarstenbaumhoegger
05/09/2018, 11:10 AMPRISMA_ENDPOINT="<http://localhost:4466/backend/dev>"
. When I run prisma deploy
now the above error is shown. Does anyone else experience this behavior?
I’m using Prisma 1.8Moritz
05/09/2018, 11:10 AM[GraphQL error]: Message: Project not found: 'moritz~xxx@alpha', Location: undefined, Path: undefined
05/09 01:09 PM (10s)
[Network error]: Error: Project not found: 'moritz~xxx@alpha'
05/09 01:09 PM (10s)
Error: Project not found: 'moritz~xxx@alpha'
Are there currently known prisma issues?nilan
05/09/2018, 11:12 AMdocker ps
?woss
05/09/2018, 12:04 PMKimo
05/09/2018, 12:20 PMgraphcool playground
shows this error. I just clicked 'OK' and moved on to write my queries...Vendicto
05/09/2018, 12:25 PMnilan
05/09/2018, 12:25 PMDave
05/09/2018, 12:38 PMidkjsx
05/09/2018, 1:58 PMidkjsx
05/09/2018, 2:01 PMidkjsx
05/09/2018, 2:05 PMidkjsx
05/09/2018, 2:07 PMpettanko
05/09/2018, 2:16 PM