# Unable to download schema using the \`apollo-kotlin-cli\`

**URL:** <https://community.apollographql.com/t/unable-to-download-schema-using-the-apollo-kotlin-cli/9283>\
**Category:** Other Apollo Topics\
**Tags:** tooling\
**Created:** [July 9, 2025, 4:25pm UTC](https://community.apollographql.com/t/unable-to-download-schema-using-the-apollo-kotlin-cli/9283 "2025-07-09T16:25:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ArjanSM](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/arjansm/32/1689_2.png) [@ArjanSM](https://community.apollographql.com/u/ArjanSM)\
**Post date:** [July 9, 2025, 4:25pm UTC](https://community.apollographql.com/t/unable-to-download-schema-using-the-apollo-kotlin-cli/9283/1 "2025-07-09T16:25:51Z")

</div>

Hi Team,

Since the `downloadApolloSchema` is deprecated, I tried using `apollo-kotlin-cli` v0.0.5 and v.0.04 as well.

I am seeing the following exception whenever I try to download the schema

```auto
Exception in thread "main" java.lang.IllegalStateException: Cannot get schema from https://www.devc.yelp.com/ __dev__ /graphql: 500:
{"errors":[{"message":"Cannot query field \"isOneOf\" on type \"__Type\".","extensions":{"code":"INVALID_GRAPHQL","stacktrace":["GraphQLError: Cannot query field \"isOneOf\" on type \"__Type\"."," at Object.err (/code/node_modules/@apollo/federation-internals/src/error.ts:36:60)"," at validate (/code/node_modules/@apollo/federation-internals/src/operations.ts:63:34)"," at selectionOfNode (/code/node_modules/@apollo/federation-internals/src/operations.ts:3894:7)"," at selectionSetOfNode (/code/node_modules/@apollo/federation-internals/src/operations.ts:3867:20)"," at /code/node_modules/@apollo/federation-internals/src/operations.ts:3972:34"," at Array.forEach (<anonymous>)"," at operationFromDocument (/code/node_modules/@apollo/federation-internals/src/operations.ts:3968:24)"," at /code/node_modules/@apollo/gateway/src/index.ts:803:58"," at AsyncLocalStorage.run (node:internal/async_local_storage/async_hooks:91:14)"," at AsyncLocalStorageContextManager.with (/code/node_modules/@opentelemetry/context-async-hooks/src/AsyncLocalStorageContextManager.ts:40:36)"]}}]}

        at com.apollographql.apollo.tooling.SchemaHelper.fetch(SchemaHelper.kt:63)
        at com.apollographql.apollo.tooling.SchemaHelper.executeIntrospectionQuery$apollo_tooling(SchemaHelper.kt:104)
        at com.apollographql.apollo.tooling.SchemaDownloader.downloadIntrospection(SchemaDownloader.kt:150)
        at com.apollographql.apollo.tooling.SchemaDownloader.download(SchemaDownloader.kt:62)
        at com.apollographql.cli.DownloadSchemaCommand.run(DownloadSchemaCommand.kt:34)
        at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:198)
        at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:211)
        at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:18)
        at com.github.ajalt.clikt.core.CliktCommand.parse(CliktCommand.kt:400)
        at com.github.ajalt.clikt.core.CliktCommand.parse$default(CliktCommand.kt:397)
        at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:415)
        at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:440)
        at com.apollographql.cli.MainKt.main(Main.kt:55)

```

The command used by me  
` ./apollo-kotlin-cli download-schema --endpoint="https://www.some.internal.endpoint.com/ __dev__ /graphql" --schema="~/Desktop/schema_11223.json"`  
Any suggestions?

---

<div class="post-metadata">

**Author:** ![Benoit\_Lubek](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/benoit_lubek/32/2070_2.png) [@Benoit\_Lubek](https://community.apollographql.com/u/Benoit_Lubek)\
**Post date:** [July 9, 2025, 4:52pm UTC](https://community.apollographql.com/t/unable-to-download-schema-using-the-apollo-kotlin-cli/9283/2 "2025-07-09T16:52:24Z")

</div>

Hi!

Can you execute this query on your server, and see if there is a field named `oneOf` in the response?

```graphql
query ExampleQuery {
  __type(name: "__Type") {
    fields {
      name
    }
  }
}

```

If yes, then it should be possible to query this field, and the error from the server is a probable bug on that side.

---

<div class="post-metadata">

**Author:** ![ArjanSM](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/arjansm/32/1689_2.png) [@ArjanSM](https://community.apollographql.com/u/ArjanSM)\
**Post date:** [July 9, 2025, 5:05pm UTC](https://community.apollographql.com/t/unable-to-download-schema-using-the-apollo-kotlin-cli/9283/4 "2025-07-09T17:05:05Z")

</div>

Hi @Benoit_Lubek  
While there isn’t a field named `oneOf` there is however one names `isOneOf`.  
Could that be an issue?

---

<div class="post-metadata">

**Author:** ![Benoit\_Lubek](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/benoit_lubek/32/2070_2.png) [@Benoit\_Lubek](https://community.apollographql.com/u/Benoit_Lubek)\
**Post date:** [July 9, 2025, 5:13pm UTC](https://community.apollographql.com/t/unable-to-download-schema-using-the-apollo-kotlin-cli/9283/5 "2025-07-09T17:13:53Z")

</div>

Yes sorry that’s what I meant, `isOneOf`. Since it is listed in the fields of `__Type`, it should be allowed to select it in this query without resulting in an error:

```graphql
query ExampleQuery {
  __schema {
    types {
      isOneOf
    }
  }
}

```

Can you bring this to the attention of people in charge of the server?
