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

Struct initialiser for ApolloSchemaDownloadConfiguration.HTTPHeader is internal #1961

Closed
nsivertsen opened this issue Sep 23, 2021 · 1 comment · Fixed by #1962
Closed

Struct initialiser for ApolloSchemaDownloadConfiguration.HTTPHeader is internal #1961

nsivertsen opened this issue Sep 23, 2021 · 1 comment · Fixed by #1962

Comments

@nsivertsen
Copy link
Contributor

nsivertsen commented Sep 23, 2021

Bug report

The initialiser for the struct ApolloSchemaDownloadConfiguration.HTTPHeader is internal, which means that custom HTTP headers cannot be added to a ApolloSchemaDownloadConfiguration.

Versions

Please fill in the versions you're currently using:

  • apollo-ios SDK version: 0.49.0
  • Xcode version: Version 13.0 beta 5
  • Swift version: 5.5.0
  • Package manager: Swift Package Manager

Steps to reproduce

Add the iOS Codegen Template to a project and attempt to define and pass custom HTTP headers for the downloadSchema command:

let headers = [
  ApolloSchemaDownloadConfiguration.HTTPHeader(key: "Authorization", value: "Bearer MY_TOKEN"),
]

let schemaDownloadOptions = ApolloSchemaDownloadConfiguration(using: .introspection(endpointURL: endpoint),
                                                              headers: headers,
                                                              outputFolderURL: folderForDownloadedSchema)

Running the downloadSchema command then gives this error:

error: 'ApolloSchemaDownloadConfiguration.HTTPHeader' initializer is inaccessible due to 'internal' protection level
@calvincestari
Copy link
Member

The fix for this will be released in 0.49.1 shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants