You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need a way to directly reference an enum we created in our schema in our frontend app code. Currently, I have been running: npx ampx generate graphql-client-code and putting the resulting API.ts file in a shared folder and then importing the desired enum from there, but it would be nice to be able to import the enum directly from graphQLClient like we do with mutations and queries.
Describe the solution you'd like
Currently, you can import the schema like so: import type { Schema } from '../amplify/data/resource';
so the simplest solution would be something like this: import enum { someEnumName } from '../amplify/data/resource';
Describe alternatives you've considered
I have been running: npx ampx generate graphql-client-code and putting the resulting API.ts file in a shared folder and then importing the desired enum from there, but this is a bit clunky since you have to regenerate this file whenever you make a change to your schema.
Additional context
No response
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
The text was updated successfully, but these errors were encountered:
Describe the feature you'd like to request
We need a way to directly reference an enum we created in our schema in our frontend app code. Currently, I have been running: npx ampx generate graphql-client-code and putting the resulting API.ts file in a shared folder and then importing the desired enum from there, but it would be nice to be able to import the enum directly from graphQLClient like we do with mutations and queries.
Describe the solution you'd like
Currently, you can import the schema like so: import type { Schema } from '../amplify/data/resource';
so the simplest solution would be something like this: import enum { someEnumName } from '../amplify/data/resource';
Describe alternatives you've considered
I have been running: npx ampx generate graphql-client-code and putting the resulting API.ts file in a shared folder and then importing the desired enum from there, but this is a bit clunky since you have to regenerate this file whenever you make a change to your schema.
Additional context
No response
Is this something that you'd be interested in working on?
Would this feature include a breaking change?
The text was updated successfully, but these errors were encountered: