https://kotlinlang.org logo
Title
n

Nick

02/11/2022, 4:34 PM
Is it possible to add a header on the introspection? We need to add an auth token for ours to work.
m

mbonnin

02/11/2022, 4:36 PM
From the command line, I think you can do
--header "Key: Value"
n

Nick

02/11/2022, 4:37 PM
Is there a way you can do it with Gradle? I tried:
header.set("X-Admin-Token" : "xxxxxxk")
but it’s giving me an error:
> Could not get unknown property 'header' for object of type com.apollographql.apollo3.gradle.internal.DefaultIntrospection.
n

Nick

02/11/2022, 4:39 PM
❤️ thanks!
m

mbonnin

02/11/2022, 4:39 PM
PS: if you move to
build.gradle.kts
, you'll get autocomplete for this kind of stuff
n

Nick

02/11/2022, 4:40 PM
we’re working on an older branch right now 😞, our new stuff is all kts.
😢 1