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

Typing issue in REST api #5805

Closed
FelixMalfait opened this issue Jun 10, 2024 · 1 comment · Fixed by #5818
Closed

Typing issue in REST api #5805

FelixMalfait opened this issue Jun 10, 2024 · 1 comment · Fixed by #5818
Assignees

Comments

@FelixMalfait
Copy link
Member

AmountMicros is displayed as a string but is a number in GraphQL.

There might be other typing issues

Copy link
Contributor

greptile-apps bot commented Jun 10, 2024

Disclaimer: This comment was automatically generated with AI. It can give some useful hints as to where to look for, but sometimes it can also give very inaccurate answers so takes this with a pinch of salt :).

To resolve the typing issue for AmountMicros being displayed as a string but is a number in GraphQL, follow these steps:

  1. Check Type Definitions: Locate the type definitions for ApiRestQuery, ApiRestResponse, and ApiRestQueryVariables.

  2. Update Type: Ensure that AmountMicros is consistently typed as a number in these definitions. For example:

// Example file: src/types/ApiRestResponse.ts
export interface ApiRestResponse {
  // other fields
  AmountMicros: number; // Ensure this is typed as a number
}
  1. Verify Usage: Check all instances where AmountMicros is used in the codebase to ensure it adheres to the updated type definition.

  2. GraphQL Schema: Ensure the GraphQL schema also reflects AmountMicros as a number.

# Example file: src/graphql/schema.graphql
type SomeType {
  # other fields
  AmountMicros: Float!
}

This should resolve the typing inconsistency between REST API and GraphQL.

References

@martmull martmull moved this from 🆕 New to 🔖 Planned in Product development ✅ Jun 11, 2024
@martmull martmull linked a pull request Jun 11, 2024 that will close this issue
@github-project-automation github-project-automation bot moved this from 🔖 Planned to ✅ Done in Product development ✅ Jun 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants