Skip to content

Keys with collection values will be stringified as YAML due to JS Object restrictions #3237

@sergsalo

Description

@sergsalo

Recently started to see this warning during codegen:

(node:17948) YAMLWarning: Keys with collection values will be stringified as YAML due to JS Object restrictions. Use mapAsMap: true to avoid this. at line 6, column 11:

JSON: { [key: string]: any }

codegen.yml:

overwrite: true
schema: "src/schema/**/*.graphql"
documents: null
scalars:
    DateTime: Date
    JSON: { [key: string]: any }
config:
    contextType: ../context#Context
generates:
  src/generated/graphql.ts:
    plugins:
      - "typescript"
      - "typescript-resolvers"

not sure where/how to use "mapAsMap" to fix the issue

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions