Search code examples
graphqlaws-amplifyaws-appsync

Amplify Graphql Error: "Trying to redefine existing 'something' type" and tried to use an undeclared directive 'aws_subscribe'


I am getting following error as shown in image snapshot below. 1st Error: Trying to redefine existing 'something' type. But i am only defining it once and i have made no changes to the file. This is autogenerated file from amplify add API command. 2nd Error: tried to use undeclared directive 'aws_subscribe'

I cannot understand what i am doing wrong.enter image description here


Solution

  • Problem not exactly solved. But most probably right steps were not followed while adding api. Did again and everything worked fine this time.