amplify-category-api icon indicating copy to clipboard operation
amplify-category-api copied to clipboard

simple data schema with a query producing several warnings on deployment

Open josefaidt opened this issue 1 year ago • 2 comments

Environment information

System:
  OS: macOS 14.6.1
  CPU: (10) arm64 Apple M1 Pro
  Memory: 84.02 MB / 32.00 GB
  Shell: /opt/homebrew/bin/fish
Binaries:
  Node: 20.16.0 - ~/.local/state/fnm_multishells/28867_1724346485912/bin/node
  Yarn: undefined - undefined
  npm: 10.8.1 - ~/.local/state/fnm_multishells/28867_1724346485912/bin/npm
  pnpm: 9.7.0 - ~/.local/state/fnm_multishells/28867_1724346485912/bin/pnpm
NPM Packages:
  @aws-amplify/auth-construct: Not Found
  @aws-amplify/backend: 1.1.1
  @aws-amplify/backend-auth: Not Found
  @aws-amplify/backend-cli: 1.2.4
  @aws-amplify/backend-data: Not Found
  @aws-amplify/backend-deployer: Not Found
  @aws-amplify/backend-function: Not Found
  @aws-amplify/backend-output-schemas: Not Found
  @aws-amplify/backend-output-storage: Not Found
  @aws-amplify/backend-secret: Not Found
  @aws-amplify/backend-storage: Not Found
  @aws-amplify/cli-core: Not Found
  @aws-amplify/client-config: Not Found
  @aws-amplify/deployed-backend-client: Not Found
  @aws-amplify/form-generator: Not Found
  @aws-amplify/model-generator: Not Found
  @aws-amplify/platform-core: Not Found
  @aws-amplify/plugin-types: Not Found
  @aws-amplify/sandbox: Not Found
  @aws-amplify/schema-generator: Not Found
  aws-amplify: 6.5.2
  aws-cdk: 2.154.0
  aws-cdk-lib: 2.154.0
  typescript: 5.5.4
AWS environment variables:
  AWS_PROFILE = josef
  AWS_REGION = us-east-1
  AWS_STS_REGIONAL_ENDPOINTS = regional
  AWS_NODEJS_CONNECTION_REUSE_ENABLED = 1
  AWS_SDK_LOAD_CONFIG = 1
No CDK environment variables

Description

I have a small schema

import { type ClientSchema, a, defineData } from "@aws-amplify/backend"
import { myFunction } from "./my-function/resource"

const schema = a
  .schema({
    sayHello: a
      .query()
      .arguments({
        name: a.string(),
      })
      .returns(a.string()),
  })
  .authorization((allow) => [
    allow.resource(myFunction).to(["query", "mutate", "listen"]),
  ])

export type Schema = ClientSchema<typeof schema>

export const data = defineData({
  schema,
  authorizationModes: {
    defaultAuthorizationMode: "iam",
  },
})

When I deploy I am observing 6 occurrences of a warning despite not using manyToMany

[Warning at /amplify-reproamplifygen2schemadefaultargument-josefai-sandbox-e3dea13dde/data/amplifyData/GraphQLAPI] @predictions is deprecated. This functionality will be removed in the next major release.

CleanShot 2024-08-22 at 10 08 31@2x

josefaidt avatar Aug 22 '24 17:08 josefaidt