Amplify Toolbox
    Preparing search index...
    • Use a custom mutation to define an API request that will modify backend data or trigger a subscription event.

      Returns CustomOperation<
          {
              arguments: null;
              authorization: [];
              handlers: null;
              returnType: null;
              typeName: "Mutation";
          },
          "for",
          "mutationCustomOperation",
      >

      a custom mutation

      likePost: a
      .mutation()
      .arguments({ postId: a.string() })
      .returns(a.ref('Post'))
      .authorization(allow => [allow.publicApiKey()])
      .handler(a.handler.function(echoHandler))