yuki24 / artemis

Ruby GraphQL client on Rails that actually makes you more productive
MIT License
207 stars 14 forks source link

Allow overriding all headers in the Artemis rake task #85

Closed DougEdey closed 1 year ago

DougEdey commented 1 year ago

For some clients I use, I need a different auth header, this allows me to do that by using an ENV variable of "ARTEMIS_HEADERS" that allows me to set a JSON String for the headers. Not the greatest solution, but it works!

erikdstock commented 1 year ago

Hi Doug - can this be accomplished using the existing callbacks + context[:headers]? It seems like having separated X_HEADERS, Y_HEADERS etc would be more maintainable and avoid the need for json in your environment.

DougEdey commented 1 year ago

I'll explore that, since this task has an AUTHENTICATION input I figured that's how the author of this gem wanted headers to be handled in this task.