Replies: 1 comment 1 reply
-
@tomschut I did encounter the same issue for one of my projects and ended up doing same as you just described. Have a look at this issue (and proposed API) and let me know what you think? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
We've been trying to add a virtual field to our schema within the mechanisms set by prisma appsync and are running into some problems.
We've got a schema like this, generated from the prisma schema
which we extend with an extra property, newImageObject, which is not present in the database schema.
So we've extended the graphQl schema like this:
with an after hook that picks up this field so that it can be constructed from the properties present.
This will produce an error in prisma since newImageObject is not a database column.
Our solution to this for now is stripping the field from the prisma args in a before hook (and adding the necessary properties that are needed to construct the virtual field in the after hook)
This solution is a bit inelegant, and I'd like to see if there's a better solution (to be made)
Unless there's already a better way I'd propose to support virtual fields by
Beta Was this translation helpful? Give feedback.
All reactions