Closed rongfengliang closed 6 years ago
i found some thing
first time i use prisma deploy with server side subscriptions config is throw errors
but if i comment the server side subscriptions just like this
endpoint: http://localhost:4466
datamodel: datamodel.graphql
# subscriptions:
# welcomeNewUser:
# webhook: http://mock:8080/webhook
# query: subscription.graphql
and prisma deploy it ok but server side subscriptions not work (certainly)
then i uncomment the server side subscriptions config
endpoint: http://localhost:4466
datamodel: datamodel.graphql
subscriptions:
welcomeNewUser:
webhook: http://mock:8080/webhook
query: subscription.graphql
i use prisma deploy --force it works
some data from mysql
# projectId, revision, schema, functions, status, applied, rolledBack, steps, errors, startedAt, finishedAt
'default@default', '3', '{\"models\":[{\"name\":\"User\",\"stableIdentifier\":\"cjld7i4ew00040a509xlp1x2f\",\"fields\":[{\"name\":\"id\",\"typeIdentifier\":\"GraphQLID\",\"isRequired\":true,\"isList\":false,\"isUnique\":true,\"isHidden\":false,\"isReadonly\":false,\"isAutoGenerated\":false},{\"name\":\"name\",\"typeIdentifier\":\"String\",\"isRequired\":true,\"isList\":false,\"isUnique\":false,\"isHidden\":false,\"isReadonly\":false,\"isAutoGenerated\":false},{\"name\":\"age\",\"typeIdentifier\":\"Int\",\"isRequired\":false,\"isList\":false,\"isUnique\":false,\"isHidden\":false,\"isReadonly\":false,\"isAutoGenerated\":false},{\"name\":\"version\",\"typeIdentifier\":\"String\",\"isRequired\":true,\"isList\":false,\"isUnique\":false,\"isHidden\":false,\"isReadonly\":false,\"isAutoGenerated\":false},{\"name\":\"updatedAt\",\"typeIdentifier\":\"DateTime\",\"isRequired\":true,\"isList\":false,\"isUnique\":false,\"isHidden\":true,\"isReadonly\":true,\"isAutoGenerated\":false},{\"name\":\"createdAt\",\"typeIdentifier\":\"DateTime\",\"isRequired\":true,\"isList\":false,\"isUnique\":false,\"isHidden\":true,\"isReadonly\":true,\"isAutoGenerated\":false}]}],\"relations\":[],\"enums\":[]}', '[{\"name\":\"welcomeNewUser\",\"isActive\":true,\"delivery\":{\"url\":\"http://mock:8080/webhook\",\"headers\":[],\"type\":\"webhook-delivery\"},\"query\":\"subscription {\\n user(where:\\n {\\n mutation_in:CREATED\\n }){\\n node {\\n id\\n name\\n age\\n }\\n }\\n}\",\"type\":\"server-side-subscription\"}]', 'SUCCESS', '0', '0', '[]', '[]', '2018-08-28 04:23:47', '2018-08-28 04:23:47'
and then i call creteuser mutation
mutation {
createUser(data:{
name:"appdemo",
age:444,
version:"v1"
}){
id
name
age
version
}
}
the wiremock log message
maybe with some wrong for deploy with config server side subscriptions
Thanks for reporting this! This seems to be a duplicate of #2064, which was fixed in 1.15.3
. You have not specified the version you're using, so I assume you're on an older version. Please upgrade 🙂
prisma server side subscriptions deploy error when i use the service side subscriptions for test ,but i get some error
Errors:
Subscription ✖ The provided query doesn't include any known model name. Please check for the latest subscriptions API.
this is my config
datamodel.graphql
prisma.yml
subscription.graphql
docker-compose.yaml
wiremock mock json file
when i start the docker-compose service running is ok