Skip to content

Incompatible with Jest 28+ #634

@comp615

Description

@comp615

When using a project configured to use the jest transformer (i.e.):

transform: {
    '\\.(gql|graphql)$': [
      'graphql-let/jestTransformer'
    ],
}

Updating past Jest 28 will throw the following error on a line that imports a graphql file:

Invalid return value:
      `process()` or/and `processAsync()` method of code transformer found at 
      "/root/repo/node_modules/jest-transform-graphql/index.js" 
      should return an object or a Promise resolving to an object. The object 
      must have `code` property with a string of processed code.
      This error may be caused by a breaking change in Jest 28:
      https://jestjs.io/docs/upgrading-to-jest28#transformer
      Code Transformation Documentation:
      https://jestjs.io/docs/code-transformation

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