GraphQL Schema Type

I want to create graphQL schemas with using graphQL Syntax ( Not DQL Schema) in javascript. How can I achieve that purpose. In your dgraph lab you made it using UI but I want to do it in javascript clientside.

Please check these clients
https://graphql.org/code/