I would like to model an object where the client supplies input that is used to generate part of the model. The generation needs to coordinate with a 3rd party service so I assume I would need to connect this to a lambda.
Would I have to null out the mutations and attach a function directive
type Double @model(queries: null, mutations: null, subscriptions: null) @auth(rules: [{allow: owner}]) {
id: ID!
value(input: Float!): Float @function(name: "exchangeValue-${env}")
}
Or would I leave only the create mutation and somehow link that to a lambda?
type Double @model(queries: null, mutations: {create: "createDouble"}, subscriptions: null) @auth(rules: [{allow: owner}]) {
id: ID!
value(input: Float!): Float
}
Or is this not possible with the @model directive.