How to retrieve app IPs using GraphQL request

Hi there!

I’m looking for possibility to retrieve list of ip v4 and v6 for my application using GraphQL. Is it possible?

I see fly.io provides ability to get app information GitHub - fly-apps/hostnamesapi: JavaScript examples for working with the new hostnames API on Fly, but I don’t know in what fields IPs are storing in. Do you have some docs about resource structure or something else which will help me to find application IP?

Hi!

query {
  app(name:"lubien-deployed-nuxt") {
    ipAddresses {
      nodes {
        address
        createdAt
      }
    }
  }
}

Here ya go. As long as you’re logged in, you can :wink:

GraphQL has built-in docs, we use GraphQL Playground to make things simple: GraphQL Playground

Gotta love GraphQL, right?

1 Like

Perfect! Thanks a lot!

1 Like