# Adding GQL schema with lang support

**URL:** <https://discuss.dgraph.io/t/adding-gql-schema-with-lang-support/15569>\
**Category:** GraphQL\
**Created:** [September 16, 2021, 1:30am UTC](https://discuss.dgraph.io/t/adding-gql-schema-with-lang-support/15569 "2021-09-16T01:30:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bluesman](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/bluesman/32/8604_2.png) [@bluesman](https://discuss.dgraph.io/u/bluesman)\
**Post date:** [September 16, 2021, 1:30am UTC](https://discuss.dgraph.io/t/adding-gql-schema-with-lang-support/15569/1 "2021-09-16T01:30:04Z")

</div>

## Details

Following instructions here:

> **[Overview - Dgraph](https://docs.hypermode.com/dgraph/overview)**

My Dgraph schema has the following predicate:  
`label: string @index(term, fulltext) @lang .`

I’m getting an error when I try to add the following GraphQL schema:

```auto
type Synonym @key(fields: id) {
    id: ID!
    label: String @search(by: [term, fulltext]) @dgraph(pred: "label@en")
}

$ curl -X POST http://192.168.1.2:4002/admin/schema/validate --data-binary @schema.graphql
{"errors":[{"message":"Schema is valid","extensions":{"code":"success"}}]}

$ curl -X POST http://192.168.1.2:4002/admin/schema --data-binary @schema.graphql
{"errors":[{"message":"resolving updateGQLSchema failed because line 2 column 7: Missing colon in type declaration. Got @ (Locations: [{Line: 3, Column: 4}])","extensions":{"code":"Error"}}]}

```

If i take out the @en from the GraphQL schema, it saves correctly however queries return null for field label because triple objects literals are language specific

### What version of Dgraph are you using?

> **Dgraph Version**
>
> ````auto
> $ dgraph version
>  
> 
> Dgraph version : v21.03.1
> Dgraph codename : rocket-1
> Dgraph SHA-256 : a00b73d583a720aa787171e43b4cb4dbbf75b38e522f66c9943ab2f0263007fe
> Commit SHA-1 : ea1cb5f35
> Commit timestamp : 2021-06-17 20:38:11 +0530
> Branch : HEAD
> Go version : go1.16.2
> jemalloc enabled : true
> 
> For Dgraph official documentation, visit https://dgraph.io/docs.
> For discussions about Dgraph , visit http://discuss.hypermode.com.
> For fully-managed Dgraph Cloud , visit https://dgraph.io/cloud.
> 
> Licensed variously under the Apache Public License 2.0 and Dgraph Community License.
> Copyright 2015-2021 Dgraph Labs, Inc.```
> 
> </details>
> ````

---

<div class="post-metadata">

**Author:** ![bluesman](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/bluesman/32/8604_2.png) [@bluesman](https://discuss.dgraph.io/u/bluesman)\
**Post date:** [September 23, 2021, 4:52pm UTC](https://discuss.dgraph.io/t/adding-gql-schema-with-lang-support/15569/2 "2021-09-23T16:52:37Z")

</div>

Any insight by the community on this would be greatly appreciated!
