brightalley / lighthouse-apollo

Integration between Laravel Lighthouse and Apollo Studio
8 stars 3 forks source link

Make DefaultClientInformationExtractor compatible with official Apollo clients #1

Closed pyrou closed 3 years ago

pyrou commented 3 years ago

According to Apollo documentation, and official implementation of Apollo clients (iOS, web, Android), client information are sent to GraphQL server using apollographql-client-name and apollographql-client-version headers.

This PR propose to accept these headers as fallback of x-apollo-client-name and x-apollo-client-version headers. to avoid need of writing custom ClientInformationExtractor.

Further reading :

Backward compatibility:

MaartenStaa commented 3 years ago

Looks good, thanks for your contribution and the links to the relevant sources. As the master branch is a work in progress for supporting Lighthouse v5, could you rebase your patch-1 branch onto 1.x?

pyrou commented 3 years ago

rebased. But I also need it in master, but I guess you'll also merge 1.x in it after :)

MaartenStaa commented 3 years ago

Done and done, thanks again!