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

Generated dart client doesn't contain custom query/mutation #902

Open
2 tasks
nam-truong-le opened this issue Oct 27, 2024 · 0 comments
Open
2 tasks

Generated dart client doesn't contain custom query/mutation #902

nam-truong-le opened this issue Oct 27, 2024 · 0 comments
Labels
feature-request New feature or request

Comments

@nam-truong-le
Copy link

Describe the feature you'd like to request

Custom queries and mutations should be generated.

Describe the solution you'd like

Custom queries and mutations should be generated.

Describe alternatives you've considered

N/A

Additional context

Currently, according to the doc we have to manually construct the query and parse the response like this:

const graphQLDocument = '''
  query Echo(\$content: String!) {
    echo(content: \$content) {
      content
      executionDuration
    }
  }
''';


final echoRequest = GraphQLRequest<String>(
  document: graphQLDocument,
  variables: <String, String>{"content": "Hello world!!!"},
);


final response =
    await Amplify.API.query(request: echoRequest).response;
safePrint(response);


Map<String, dynamic> jsonMap = json.decode(response.data!);
EchoResponse echoResponse = EchoResponse.fromJson(jsonMap);
safePrint(echoResponse.echo.content);

Is this something that you'd be interested in working on?

  • 👋 I may be able to implement this feature request

Would this feature include a breaking change?

  • ⚠️ This feature might incur a breaking change
@nam-truong-le nam-truong-le added the pending-triage Issues that need further discussion to determine label Oct 27, 2024
@dpilch dpilch added feature-request New feature or request and removed pending-triage Issues that need further discussion to determine labels Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants