# Error: Could not parse supergraph config: subgraphs.course\_query: data did not match any variant of untagged enum SchemaSource at line 4 column 16

**URL:** <https://community.apollographql.com/t/error-could-not-parse-supergraph-config-subgraphs-course-query-data-did-not-match-any-variant-of-untagged-enum-schemasource-at-line-4-column-16/4692>\
**Category:** Schema Design\
**Tags:** federation\
**Created:** [October 7, 2022, 2:16pm UTC](https://community.apollographql.com/t/error-could-not-parse-supergraph-config-subgraphs-course-query-data-did-not-match-any-variant-of-untagged-enum-schemasource-at-line-4-column-16/4692 "2022-10-07T14:16:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ansh\_Joshi](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/ansh_joshi/32/1925_2.png) [@Ansh\_Joshi](https://community.apollographql.com/u/Ansh_Joshi)\
**Post date:** [October 7, 2022, 2:16pm UTC](https://community.apollographql.com/t/error-could-not-parse-supergraph-config-subgraphs-course-query-data-did-not-match-any-variant-of-untagged-enum-schemasource-at-line-4-column-16/4692/1 "2022-10-07T14:16:11Z")

</div>

I am on Ubuntu OS and I am using rover CLI to generate a supergraph from my subgraphs, and when I type the command

`rover supergraph compose --config ./supergraph-config.yaml`

It throws an error as:-

`error: Could not parse supergraph config: subgraphs.course_query: data did not match any variant of untagged enum SchemaSource at line 4 column 16.`

My supergraph-config.yaml is as given below

```auto
federation_version: 2
subgraphs:
  course_query:
    routing_url: location/where/endpoints/of/subgraph/are/
    schema:
      subgraph_url: location/of/subgraph/
  user_manager:
    routing_url: location/where/endpoints/of/subgraph/are/
    schema:
      subgraph_url: location/of/subgraph/

```

I am following the tutorial of [https://www.apollographql.com/](https://www.apollographql.com/) about making supergraph from subgraphs, and my subgraphs are correct. I have already tried generating a new API key and authenticating it with that.

If I use `rover subgraph list graphname@variantname` then it does show all the subgraphs, so that is also not the issue.

Can anyone help me to find out where is my error, and rectify it??

Thanks in advance

---

<div class="post-metadata">

**Author:** ![cyril36](https://sea1.discourse-cdn.com/flex019/user_avatar/community.apollographql.com/cyril36/32/3587_2.png) [@cyril36](https://community.apollographql.com/u/cyril36)\
**Post date:** [December 19, 2022, 6:11pm UTC](https://community.apollographql.com/t/error-could-not-parse-supergraph-config-subgraphs-course-query-data-did-not-match-any-variant-of-untagged-enum-schemasource-at-line-4-column-16/4692/2 "2022-12-19T18:11:08Z")

</div>

I have faced the same issue.  
As you can see in the rover documentation [Rover supergraph commands - Apollo GraphQL Docs](https://www.apollographql.com/docs/rover/commands/supergraphs/)  
when you want to parse the subgraph schema from a local file you have to use the directive “file” instead of “subgraph\_url”

Your config file should be :

> federation\_version: 2  
> subgraphs:  
> &nbsp;&nbsp;course\_query:  
> &nbsp;&nbsp;&nbsp;&nbsp;routing\_url: location/where/endpoints/of/subgraph/are/  
> &nbsp;&nbsp;&nbsp;&nbsp;schema:  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;file: location/of/subgraph/  
> &nbsp;&nbsp;user\_manager:  
> &nbsp;&nbsp;&nbsp;&nbsp;routing\_url: location/where/endpoints/of/subgraph/are/  
> &nbsp;&nbsp;&nbsp;&nbsp;schema:  
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;file: location/of/subgraph/
