# Does dgraph DQL have a custom handler function?

**URL:** https://discuss.dgraph.io/t/does-dgraph-dql-have-a-custom-handler-function/18430
**Category:** Users
**Tags:** dgraph
**Created:** [March 27, 2023, 4:20am UTC](https://discuss.dgraph.io/t/does-dgraph-dql-have-a-custom-handler-function/18430 "2023-03-27T04:20:18Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![JY-Sun-K](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/jy-sun-k/32/10368_2.png) [@JY-Sun-K](https://discuss.dgraph.io/u/JY-Sun-K)
#### Post date: [March 27, 2023, 4:20am UTC](https://discuss.dgraph.io/t/does-dgraph-dql-have-a-custom-handler-function/18430/1 "2023-03-27T04:20:18Z")

</div>

> type Device {  
> code  
> }  
> code string.

The content of code is “100-01.00”, “99-01.00”, “98-01.00”… , and its format is xxx-01.00  
So how would I get the largest code to compare the contents of xxx using the rules of numbers.  
I used graphql-go → dgraph (go grpc → DQL to get data).

Is there a custom DQL built-in function, similar to max() toInt()?  
Or use graphql-go for processing after all the data is obtained?

---

<div class="post-metadata">

### Author: ![MichelDiz](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/micheldiz/32/11873_2.png) [@MichelDiz](https://discuss.dgraph.io/u/MichelDiz)
#### Post date: [March 27, 2023, 4:48am UTC](https://discuss.dgraph.io/t/does-dgraph-dql-have-a-custom-handler-function/18430/2 "2023-03-27T04:48:20Z")

</div>

> [@JY-Sun-K](#):
>
> Is there a custom DQL built-in function, similar to max() toInt()?

No, we have custom DQL in GraphQL. But no functions like that.

> [@JY-Sun-K](#):
>
> use graphql-go for processing after all the data is obtained?

You can try Lambdas for your case.

---

<div class="post-metadata">

### Author: ![JY-Sun-K](https://yyz1.discourse-cdn.com/flex007/user_avatar/discuss.dgraph.io/jy-sun-k/32/10368_2.png) [@JY-Sun-K](https://discuss.dgraph.io/u/JY-Sun-K)
#### Post date: [March 27, 2023, 4:52am UTC](https://discuss.dgraph.io/t/does-dgraph-dql-have-a-custom-handler-function/18430/3 "2023-03-27T04:52:59Z")

</div>

OK, thank you very much for your reply. 😃
