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

Add support for multiple headers #1153

Merged

Conversation

LachlanMcCulloch
Copy link

No description provided.

@apollo-cla
Copy link

@LachlanMcCulloch: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/

<FileRef
location = "self:">
</FileRef>
</Workspace>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe this needs to be committed

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have removed - I'm unfamiliar with SPM 😅

@@ -54,7 +57,8 @@ class ApolloSchemaTests: XCTestCase {
"--endpoint=http://localhost:8080/graphql",
"--key=\(apiKey)",
"'\(expectedOutputURL.path)'",
"--header='\(header)'"
"--header='\(headers.first!)'",
"--header='\(headers.last!)'"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer these not have force-unwraps - maybe declare it as two vars and then shove those into the header array. However, this is something I can fix post-merge if you prefer.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too easy - have created two separate variables labelled firstHeader and lastHeader for clarity and to remove the force unwraps

@@ -4,6 +4,6 @@ import XCTest
class VersionNumberTests: XCTestCase {
func testVersionNumberExists() {
// It would be the first 2 digits of version number like `0.19`.
XCTAssertGreaterThanOrEqual(ApolloVersionNumber, 0)
// XCTAssertGreaterThanOrEqual(ApolloVersionNumber, 0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should not be committed - I know it doesn't run right if you're not using the schemes, but I'd still prefer to run it with the schemes.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, this was my bad, I meant to uncomment and should be back to normal now

Copy link
Contributor

@designatednerd designatednerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you so much for this! Will go out with the next release.

@designatednerd designatednerd merged commit 0d40da2 into apollographql:master Apr 15, 2020
@designatednerd designatednerd added this to the Next Release milestone Apr 15, 2020
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 this pull request may close these issues.

3 participants