# Motoko query builder for Sudograph?

**URL:** <https://forum.dfinity.org/t/motoko-query-builder-for-sudograph/11565>\
**Category:** Developers\
**Created:** [March 18, 2022, 1:01am UTC](https://forum.dfinity.org/t/motoko-query-builder-for-sudograph/11565 "2022-03-18T01:01:32Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![alejandrade](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/alejandrade/32/4593_2.png) [@alejandrade](https://forum.dfinity.org/u/alejandrade)\
**Post date:** [March 18, 2022, 1:01am UTC](https://forum.dfinity.org/t/motoko-query-builder-for-sudograph/11565/1 "2022-03-18T01:01:33Z")

</div>

Hi everyone,

Noob in motoko here, I’ve been building out an application and learning at my own pace.

I quickly learned about sudograph which is very cool but I noticed all the examples build the query from the front end.

Do we have a query builder tool for sudograph in motoko?

While on topic has anyone built any validation utility?

@lastmjs tagged because you the creator.

---

<div class="post-metadata">

**Author:** ![lastmjs](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/lastmjs/32/3406_2.png) [@lastmjs](https://forum.dfinity.org/u/lastmjs)\
**Post date:** [March 18, 2022, 12:43pm UTC](https://forum.dfinity.org/t/motoko-query-builder-for-sudograph/11565/2 "2022-03-18T12:43:08Z")

</div>

Have you seen the following examples/documentation?

- [sudograph/examples/motoko-client at main · sudograph/sudograph · GitHub](https://github.com/sudograph/sudograph/tree/main/examples/motoko-client)
- [Authorization - Sudograph](https://i67uk-hiaaa-aaaae-qaaka-cai.raw.ic0.app/authorization.html#motoko-authorization)

Also @ayjayem I believe has experience with using Sudograph and Motoko in an actual project, perhaps he can shed some more light on practical usage.

---

<div class="post-metadata">

**Author:** ![alejandrade](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/alejandrade/32/4593_2.png) [@alejandrade](https://forum.dfinity.org/u/alejandrade)\
**Post date:** [March 18, 2022, 2:01pm UTC](https://forum.dfinity.org/t/motoko-query-builder-for-sudograph/11565/3 "2022-03-18T14:01:59Z")

</div>

Yeah I did see that I was hoping some one made some kind of query builder tool that generates the string so I don’t have to 😂.

---

<div class="post-metadata">

**Author:** ![lastmjs](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/lastmjs/32/3406_2.png) [@lastmjs](https://forum.dfinity.org/u/lastmjs)\
**Post date:** [March 18, 2022, 2:53pm UTC](https://forum.dfinity.org/t/motoko-query-builder-for-sudograph/11565/4 "2022-03-18T14:53:27Z")

</div>

Yeah there are no GraphQL query builder tools for Motoko. Motoko is very young and doesn’t have very many libraries at all, definitely no GraphQL libraries that I know of.

Good news is that Azle [GitHub - demergent-labs/azle: TypeScript/JavaScript CDK for the Internet Computer](https://github.com/demergent-labs/azle) is coming along very well, and since it allows you to write canisters in TypeScript/JavaScript, you should then be able to use many of the GraphQL tools that people have already built, I assume there are some more mature GraphQL query builders by now.

---

<div class="post-metadata">

**Author:** ![lastmjs](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/lastmjs/32/3406_2.png) [@lastmjs](https://forum.dfinity.org/u/lastmjs)\
**Post date:** [March 18, 2022, 2:53pm UTC](https://forum.dfinity.org/t/motoko-query-builder-for-sudograph/11565/5 "2022-03-18T14:53:53Z")

</div>

Personally I like to just write my GraphQL directly, and I have VS Code plugins that do type-checking on them.

---

<div class="post-metadata">

**Author:** ![alejandrade](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/alejandrade/32/4593_2.png) [@alejandrade](https://forum.dfinity.org/u/alejandrade)\
**Post date:** [March 18, 2022, 3:04pm UTC](https://forum.dfinity.org/t/motoko-query-builder-for-sudograph/11565/6 "2022-03-18T15:04:54Z")

</div>

Oo I didn’t even consider using typescript, thanks!

---

<div class="post-metadata">

**Author:** ![lastmjs](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/lastmjs/32/3406_2.png) [@lastmjs](https://forum.dfinity.org/u/lastmjs)\
**Post date:** [March 18, 2022, 3:59pm UTC](https://forum.dfinity.org/t/motoko-query-builder-for-sudograph/11565/7 "2022-03-18T15:59:08Z")

</div>

Keep in mind that Azle is alpha software but you can definitely try it out now

---

<div class="post-metadata">

**Author:** ![alejandrade](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/alejandrade/32/4593_2.png) [@alejandrade](https://forum.dfinity.org/u/alejandrade)\
**Post date:** [March 18, 2022, 4:42pm UTC](https://forum.dfinity.org/t/motoko-query-builder-for-sudograph/11565/8 "2022-03-18T16:42:57Z")

</div>

haha, if I was deterred by alpha software I would be coding Spring Boot Apps

---

<div class="post-metadata">

**Author:** ![ayjayem](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ayjayem/32/1019_2.png) [@ayjayem](https://forum.dfinity.org/u/ayjayem)\
**Post date:** [April 23, 2022, 3:22pm UTC](https://forum.dfinity.org/t/motoko-query-builder-for-sudograph/11565/9 "2022-04-23T15:22:56Z")

</div>

@lastmjs @alejandrade

Apologies for the late reply on this! @alejandrade, please reach out if you’d like - not an expert by any means, but I’ve been working with Sudograph over the past months, and love it. Would be happy to offer whatever I can to others who could benefit as well.
