apollographql / apollo-ios

📱  A strongly-typed, caching GraphQL client for iOS, written in Swift.
https://www.apollographql.com/docs/ios/
MIT License
3.89k stars 728 forks source link

Is there a way to generate only mocks? #3297

Closed tahirmt closed 11 months ago

tahirmt commented 11 months ago

Question

Hello! I am trying to put the codegen in a swift package plugin. I'm creating my own executable using ApolloCodegenLib and am wondering if there is a way for me to run codegen for the actual operations and mocks separately. I know I can optionally not generate mocks but can I optionally not generate operations at all? That way I would be able to add two plugins to generate mocks and operations separately for their own packages.

calvincestari commented 11 months ago

Hi @tahirmt, no there isn't a way to only generate mocks at the moment. I also don't think this is something we would put effort into unfortunately; it seems a very individual workflow-specific requirement.