More of a project structure and IDE question I gue...
# apollo-kotlin
s
More of a project structure and IDE question I guess, but is there a way for me to share my .graphqlconfig without gitignoring it yet still have fields inside there that are hidden somehow? I just don’t quite know how to do that and any pointers would be appreciated!
Hmm went with the approach I saw here instead where I’m doing something like:
Copy code
tasks.register("downloadSchema", com.apollographql.apollo3.gradle.internal.ApolloDownloadSchemaTask::class.java) {
  endpoint.set(...can use normal gradle techniques to hide stuff)
  schema.set("shared/src/commonMain/graphql/xyz/stylianosgakis/pawfinder/schema.graphqls")
}
m
What do you mean by "hide" ? If it's shared, it's not really hidden?
s
Sorry, meant hide from the github repository as it’s public. I just wanted to have some API-keys that I didn’t want to show in GitHub. So basically have a .graphqlconfig that is version controlled but doesn’t have these API keys in plain text. In the end I ended up not using a .graphqlconfig anyway since the task suggestion by you suffices. Now I can share my repository and simply have the local.properties variables be shared outside of git with whoever needs to have access. I do want to keep it available for all modules. My wording on this was a mess wasn’t it 😂 Sorry 😄
👍 1
m
Gotcha 👍 Thanks for the details!
f
we use this in our proj
Copy code
"Authorization": "Bearer ${env:SHOP_API_AUTH_TOKEN}"
so when you click refresh or tries to run a query, android studio pops up a dialog asking for the value
🤩 1
my only struggle is that we have 2
.graphqlconfig
files in our proj (for 2 different servers/schemas) and I haven't figured out how to solve some of the conflicts it brings. And I haven't had the time to look into this.
s
Oh nice, that’s interesting! Might play around with this as well, thanks for sharing! 😄