Hey team, with multiple services, is there a way t...
# apollo-kotlin
g
Hey team, with multiple services, is there a way to prevent publishing metadata for some of the services? I have 3 services that generates metadata but I only want to include two of them when publishing metadata.
m
Are you publishing to an external repo?
And 2nd question: are all your services multi-module?
I want to say you could set
generateApolloMetadata.set(false)
but this obviously won’t work if you’re multi-module
g
Yes, maven repo. And yes. Yeah I don't want to set it to false. It is a local schema for local development, so there is no schema file in source code and it fails the build when it tries to generate code. I will need to maybe copy schema temporarily during publishing and delete afterwards
m
That’s a though one. There’s a single software component for apollo where services are different variants
Interestingly, I filed https://github.com/apollographql/apollo-kotlin/issues/5960 yesterday which would kind of make it completely impossible to configure publication per-service
🦜 1
What about moving
schema3
(that you don’t want to publish) to a separate module where you do not apply
maven-publish
?
g
That might work! It will require more work to refactor but it is an option.
m
Out of curiosity, what’s the issue with publishing the metadata? Is the schema confidential?
g
No, we don't have schema file checked in to source code. It is meant to be a local host setup. Devs can copy the schema there, change the types, and develop their components before the schema in the server is ready. Since there is no schema file it fails the publish job. I think I will write a custom task to disable the metada generation when publish task is triggered
m
ooooh I see 👍