I am trying to write a Graphql schema for creating API. Here is the GraphQL schema :
input AMPLIFY { globalAuthRule: AuthRule = { allow: public } } # FOR TESTING ONLY!
type User @model {
id: ID!
username: String!
posts: [Post] @connection(keyName:"byUser", fields: ["id"])
}
type Post @model @key( name: "byUser",fields: ["userID"] ){
id: ID!
videoUri: String!
description:String!
userID: ID!
user: User @connection(fields:["userID"])
songID: ID!
song:Song @connection(fields:["songID"])
}
type Song @model {
id: ID!
name: String!
imageUri: String!
}
I am trying to write a GraphQL schema for creating an API for my project and later after doing amplify push in my terminal I am getting this error "Your GraphQL Schema is using "@connection", "@key" directives from an older version of the GraphQL Transformer.
"
and after doing amplify console api I am getting this error on the AWS amplify console.
Please correct me where I am wrong as I am new to GraphQL and AWS. Thanks