question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't use AWS Scalars

See original GitHub issue

when using AWS Scalars like AWSURL the test doesn’t pass

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:17 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
timgivoiscommented, Jan 22, 2019

Sure @estrada9166, I’ll dive into the code this days. If anything comes up I’ll directly reach you!

0reactions
estrada9166commented, Jan 22, 2019

That awesome!! We need to do multiple things!

How to do it?

  • We should validate if the argument is scalar, so, we have the parsed schema (schema) and each argument has a type property (will be the nested type), so we can search for that type on the schema, if there is one check the type if it’s 'ScalarTypeDefinition' so if it’s it means that isScalar = true

    • This should be done here and here and pass the value to validateInputArg() as last argument… we should remove that true
  • Now on validateInputArg we have to do multiple things:

    • filteredArg can be undefined but sometimes it should not be that because schemaVar can be an object but it doesn’t mean is a nested object that we can access like schemaVar[arg.name], so we should validate if filteredArg is undefined, lets check if it’s an object that contains kind and use getArgValue(schemaVar) to get the argument value… when is this happening? This is the case
    • We should remove isScalar from here because, now if it’s undefined is because that argument is missing
    • The last thing is to validate is isScalar before validating the typeof of the argument, so if it’s a scalar we should return

I tried to explain with the more details possible, but if can help you with more details or something else, it’ll be a pleasure for me 😃!!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Scalar types in AWS AppSync
AWS AppSync does not support custom scalars. This means that you cannot use AWS as a prefix for custom object types. The following...
Read more >
Custom scalar types · Issue #26 · aws/aws-appsync-community
AppSync comes with the default GraphQL scalar types and with some handy additional AWS types. It would be nice, however, to be able...
Read more >
AWS Appsync Scalar types and Apollo Federation - Help
Hi Guys, I'm currently facing a problem that I have no idea on how this could be solved with the federation gateway.
Read more >
Define ID Scalar Type in AWS AppSync - Stack Overflow
The ID scalar type is a unique identifier that can be either String or Int. You can control these in your resolver mapping...
Read more >
API (GraphQL) - Data modeling - AWS Amplify Docs
Add authorization rules to your GraphQL schema to control access to your data. ... Note: After a primary key is configured and deployed,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found