# How to generate the final schema

**URL:** <https://discuss.dgraph.io/t/how-to-generate-the-final-schema/11544>\
**Category:** GraphQL\
**Tags:** kind:question\
**Created:** [November 19, 2020, 3:01pm UTC](https://discuss.dgraph.io/t/how-to-generate-the-final-schema/11544 "2020-11-19T15:01:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![maaft](https://avatars.discourse-cdn.com/v4/letter/m/4af34b/32.png) [@maaft](https://discuss.dgraph.io/u/maaft)\
**Post date:** [November 19, 2020, 3:01pm UTC](https://discuss.dgraph.io/t/how-to-generate-the-final-schema/11544/1 "2020-11-19T15:01:04Z")

</div>

In my development process I rely heavily on code generation to speed things up significantly. Therefore, I need the final GQL-schema that is published by dgraph.

Currently, I use this procedure to get my hands on that schema:

```bash
curl -X POST localhost:8080/admin/schema --data-binary '@dgraph.graphql'
get-graphql-schema http://localhost:8080/graphql > api.graphql
go run github.com/maaft/gqlgenc # takes api.graphql and generates golang client

```

Now the big problem is that I use the generated golang client in my 2nd GQL server that is accessed via @custom mutations and queries in `dgraph.graphql`. This means that if the generated client has bugs (happens sometimes due to git merge stuff etc) I have circular dependencies that don’t resolve.  
I need the correct client to start my GQL server. The server is needed so I can post the schema to dgraph. Dgraph is needed to fetch the final schema which is needed to generate the client.

Is there any way out of this misery?

I guess what I am really asking is: Can I disable the schema introspection checks for @custom queries?

---

<div class="post-metadata">

**Author:** ![miko](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/miko/32/2493_2.png) [@miko](https://discuss.dgraph.io/u/miko)\
**Post date:** [November 19, 2020, 3:32pm UTC](https://discuss.dgraph.io/t/how-to-generate-the-final-schema/11544/2 "2020-11-19T15:32:14Z")

</div>

[https://dgraph.io/docs/graphql/custom/directive](https://dgraph.io/docs/graphql/custom/directive) have You tried `skipIntrospection: true` ?

---

<div class="post-metadata">

**Author:** ![maaft](https://avatars.discourse-cdn.com/v4/letter/m/4af34b/32.png) [@maaft](https://discuss.dgraph.io/u/maaft)\
**Post date:** [November 19, 2020, 4:55pm UTC](https://discuss.dgraph.io/t/how-to-generate-the-final-schema/11544/3 "2020-11-19T16:55:45Z")

</div>

Good point, thank you.
