Skip to content

Support Apollo Engine client awareness #143

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

Merged
merged 8 commits into from
Jul 10, 2019

Conversation

tw0517tw
Copy link
Contributor

@tw0517tw tw0517tw commented Feb 1, 2019

https://www.apollographql.com/docs/platform/client-awareness.html#Setup

Supports getting name and version from ApolloClient config.

https://www.apollographql.com/docs/platform/client-awareness.html#Setup

Supports getting `name` and `version` from ApolloClient config.
@jaydenseric
Copy link
Owner

Sorry for the delay! I hope to review this in the next few days, in principle I support the change :)

@KillerCodeMonkey
Copy link

KillerCodeMonkey commented Jul 4, 2019

@jaydenseric is it possible to look into it again?

The failing test is only the file size limit.

Actually we can not distinguish our clients, because all clients are tracked by "Unidentified clients" in apollo engine and we can not get the important info like where an failing query comes from.

@StefanFeederle
Copy link

There is a workaround:

const httpLink = createUploadLink({
   uri: myUrl,
   headers: {
      'apollographql-client-name': myAppName,
      'apollographql-client-version': myAppVersion,
   },
});

@KillerCodeMonkey
Copy link

KillerCodeMonkey commented Jul 4, 2019

@StefanFeederle yes i know, sure. But if the ApolloClient provides the ability to set these options during client creation a link should pass through these options and do not break default apollo behavior. Thats why i am asking :)

Because if you are working in a big project in a team you do not want that everybody needs to know the workarounds. And instead of forking and creating x-custom modules it is better to solve those issues in the base repo if it is maintained. :)

Thanks for the response.

@jaydenseric jaydenseric changed the title Support clientAwareness for Apollo Enging Support Apollo Engine client awareness Jul 7, 2019
Copy link
Owner

@jaydenseric jaydenseric left a comment

Choose a reason for hiding this comment

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

Could someone who uses Apollo Engine please verify that this works ok?

npm install tw0517tw/apollo-upload-client#patch-3

Once verified, I'll publish the new version 🙏

@KillerCodeMonkey
Copy link

KillerCodeMonkey commented Jul 7, 2019 via email

@KillerCodeMonkey
Copy link

seems to work 👍

@jaydenseric jaydenseric merged commit 241b213 into jaydenseric:master Jul 10, 2019
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.

4 participants