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 730 forks source link

Add configuration for generating Package.swift tied to pre-release of Apollo library #3017

Closed AnthonyMDev closed 5 days ago

AnthonyMDev commented 1 year ago

We should be able to generated the Package.swift to use with a specific branch or local development clone of Apollo iOS.

public enum ModuleType: Codable, Equatable {
      /// Generated schema types will be manually embedded in a target with the specified `name`.
      /// No module will be created for the generated schema types.
      ///
      /// - Note: Generated files must be manually added to your application target. The generated
      /// schema types files will be namespaced with the value of your configuration's
      /// `schemaNamespace` to prevent naming conflicts.
      case embeddedInTarget(name: String)
      /// Generates a `Package.swift` file that is suitable for linking the generated schema types
      /// files to your project using Swift Package Manager.
      case swiftPackageManager(version: ApolloPackageVersion = .release)
      /// No module will be created for the generated types and you are required to create the
      /// module to support your preferred dependency manager. You must specify the name of the
      /// module you will create in the `schemaNamespace` property as this will be used in `import`
      /// statements of generated operation files.
      ///
      /// Use this option for dependency managers, such as CocoaPods. Example usage would be to 
      /// create the podspec file that is expecting the generated files in the configured output 
      /// location.
      case other
    }

    enum ApolloPackageVersion {
      case release
      case local(path: String)
      case branch(name: String)
    }
github-actions[bot] commented 5 days ago

Do you have any feedback for the maintainers? Please tell us by taking a one-minute survey. Your responses will help us understand Apollo iOS usage and allow us to serve you better.