You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wanted to test multi-subscriptions using CLI. I created a gateway and applied the following schema:
type Query {
findPurchase(purchaseId: String): Purchase @topic(name: "purchase", keyArgument: "purchaseId")
allPurchases: [Purchase!] @topic(name: "purchase")
}
type Purchase {
purchaseId: String!
productId: Int!
userId: Int!
product: Product @topic(name: "product", keyField: "productId")
amount: Int
price: Price
}
type Product {
productId: Int!
name: String
description: String
price: Price
}
type Price {
total: Float
currency: String
}
type Click {
userId: Int!
timestamp: Int
}
type Subscription {
userStatistics: UserStatistics
}
type UserStatistics {
purchase: Purchase @topic(name: "purchase")
click: Click @topic(name: "click")
}
I received the following error: Internal Server Error: {"type":"errors/serverError","title":"Internal Server Error","code":500,"detail":"An unexpected error occurred:When the return type is not a list for a non-mutation and non-subscription type, key information (keyArgument or keyField) is needed.","uriPath":"/control/schema"} Could not apply schema to gateway: multisubstest
Investigation of the error message led me to the one of the Validation Rules - KeyInformation
The semantics of multi subscription that transfers topic directives from the Subscription type to the user-defined type clashes with this rule.
The text was updated successfully, but these errors were encountered:
This has been solved by disabling the validation rule. We will refactor the validation rules so that the one that was disabled can be enabled again. See: #94.
I wanted to test multi-subscriptions using CLI. I created a gateway and applied the following schema:
I received the following error:
Internal Server Error: {"type":"errors/serverError","title":"Internal Server Error","code":500,"detail":"An unexpected error occurred:When the return type is not a list for a non-mutation and non-subscription type, key information (keyArgument or keyField) is needed.","uriPath":"/control/schema"} Could not apply schema to gateway: multisubstest
Investigation of the error message led me to the one of the Validation Rules - KeyInformation
The semantics of multi subscription that transfers topic directives from the Subscription type to the user-defined type clashes with this rule.
The text was updated successfully, but these errors were encountered: