Your first Application | wundergraph
Version: Next

Your first Application

We created our first Data Source. Now let's build our first Application.

  • Click Applications in the nav bar, then Add New Application.
  • Give your application a name like Countries
  • Select the Data Source you wish to attach to it TrevorBlades
  • Hit Save

Once the app has been saved, it will get it's own application id, and you will get a couple of extra tabs.

  • Head over to the Operations tab.
  • Let's write a couple of queries in the GraphiQL editor & test them out
query FindCountryByCode($code: ID!) {
country(code: $code) {
code
name
native
phone
continent {
code
name
}
}
}
query FindLanguageByCode($code: ID!) {
language(code: $code) {
code
name
native
rtl
}
}

We can now test these queries by creating a variable and hitting the play button.

  • Head over to the Deployments tab, deploy our application to our Development Node and hit Save.

By default, your Development WunderNode is listening on GATEWAY_HTTP_PORT=8040. You can check this in your .env file.

WunderGraph has created 2 persisted queries for your app:

URLs are constructed as follows:

http(s)://${WunderNodeHost}:${WunderNodePort}/${Application ID}/${Operation Name}

Because we registered 2 queries, we now have 2 listen paths.

http://localhost:8040/{Application ID}/FindCountryByCode
http://localhost:8040/{Application ID}/FindLanguageByCode

Let's try querying them using Postman

Congratulations!

You just published your first Application to a WunderNode!


Subscribe to our newsletter to never miss new blog posts or announcements.