Open cookiejest opened 2 months ago
Hey👋 thanks for raising this! I'm going to transfer this over to our API repository for better assistance.
Hey @cookiejest, Thanks for raising this. Could you please share your full schema?
i think my problem is i did not include a owner field in the schema itself (I thought it would be auto populated but it was not). Once I added the field the owner the app sync was then correct with owner included.
Message: a
.model({
type: a.string(),
message: a.string(),
color: a.string(),
runId: a.id(),
promptId: a.id(),
owner: a.string(),
run: a.belongsTo('Run', 'runId'),
prompt: a.belongsTo('Prompt', 'promptId')
})
.authorization((allow) => [allow.owner()])
Hey @cookiejest, Thanks for clarifying. can you please provide the aws-amplify
lib versions you are using in your app?
"aws-amplify": "^6.4.3",
"@aws-amplify/backend": "^1.0.4",
"@aws-amplify/backend-cli": "^1.2.2",
Hey @cookiejest, Thanks for additional information. We can reproduce the issue, Hence marking it as a bug for the team to evaluate further.
Customer1: a
.model({
fullName: a.string(),
email: a.email(),
price: a.integer(),
phone: a.phone(),
})
.authorization((allow) => [allow.owner()]),
Environment information
I need to add additional fields into a few of the generated graphql schema endpoints. Speicfically the 'owner' field. This is so I can use them in the backend to correctly sync data to the front end via graphql.
What is the best way to achieve this? I can make the edits directly in appsync console, but feel there should be a way to do this through amplify v2 that I can keep within my ci/cd pipeline.
Description
E.g I want to add a 'owner' field that have not been added automatically for some reason (I think they should be):
This way i can use the graphql directly from my backend outside of amplify and have it stay in sync with the amplify v2 on the real time updates.