Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.0.0-beta.1 (serverless-appsync-plugin v2) not supporting APPSYNC_JS #195

Open
Will-Mann-16 opened this issue Mar 28, 2024 · 0 comments
Open

Comments

@Will-Mann-16
Copy link

Will-Mann-16 commented Mar 28, 2024

Describe the bug
The new beta version of the plugin doesn't support the code / APPSYNC_JS property

To Reproduce

  • Create a new project with version 1.0.0-beta.1 and add a new resolver with the code property.
  • Attempt to run
  • Notice that the config creates a default direct lambda response as opposed to using the code response.

Expected behavior

  • The response should use the code response
    Screenshots
    The resolver:
Query.codeQuery:
  dataSource: DataSource
  code: 'src/resolvers/queries/codeQuery.ts'
  kind: UNIT

Output from console:

    {
      kind: 'UNIT',
      fieldName: 'codeQuery',
      typeName: 'Query',
      dataSourceName: 'DataSource',
      requestMappingTemplate: '## Direct lambda request\n' +
        '  {\n' +
        '      "version": "2018-05-29",\n' +
        '      "operation": "Invoke",\n' +
        '      "payload": $utils.toJson($context)\n' +
        '  }\n' +
        '  ',
      responseMappingTemplate: '## Direct lambda response\n' +
        '  #if($ctx.error)\n' +
        '      $util.error($ctx.error.message, $ctx.error.type, $ctx.result)\n' +
        '  #end\n' +
        '  $util.toJson($ctx.result)\n' +
        '  '
    },

And the field resolves to null (which makes sense 😅 )

Additional context
Appreciate that this is a beta build but as APPSYNC_JS is the recommended runtime of appsync in the documentation.

Great work with the upgrade so far! Let me know if I can help with this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant