-1

I want to be able to generate typescript models for my GraphQL API but I don't want it to use datastore models. I'm generating the models for lambda backend functions where I cannot use Amplifys datastore. I don't want to have the inits functions and all that, just plan typescript models.

Is this possible?

Charles
  • 393
  • 1
  • 3
  • 15

1 Answers1

-1

You can run amplify codegen. Or use any other typescript graphql generator. Appsync schema is pure grahql plus some annotations that are ignored, so you can treat it as such. I'm not aware of any generator that would take into consideration AppSync annotations.

karjan
  • 936
  • 1
  • 7
  • 17
  • Amplify codegen setups up the Typescript for Datastore which is what I don't want. It has a bunch of lazy, eager, and init methods I don't need since I'm not using Datastore just GraphQL – Charles Feb 28 '23 at 15:55
  • That's not true, I'm using it personally just for that purpose. Configuration can be done in `.graphqlconfig.yml` – karjan Feb 28 '23 at 19:25
  • Ah okay, could you please point me towards what configuration is needed to get rid of the datastore parts? – Charles Mar 02 '23 at 18:15