Skip to main content

Making requests

Fire Arrow binds to port 8080 on interface 0.0.0.0. If Fire Arrow runs locally, requests can be made via

https://localhost:8080/graphql

Using the built-in playground

Fire Arrow comes bundled with a GraphQL playground making it very easy to browse the schema and prototype requests.

GraphQL Playground

The playground can be accessed at /graphql. When Fire Arrow runs locally, the full URL is

http://localhost:8080

A simple query to get started is

query {
Me {
reference
}
}

This query returns the identity of the client making the request.

Note

While it's a great tool during development, it is recommended to turn the GraphQL playground as well as schema download and introspection features off in production deployments.

  • Only regular clients are expected to connect in production settings. The playground is an unnecessary feature in production.
  • The playground gives malicious parties an unnecessarily easy method to connect to your API.
  • Serving the schema gives malicious parties a full overview of your API's capabilities.
  • The size of the schema is very big. While the schema is downloaded, Fire Arrow's request serving process is blocked. If the schema download is slow, Fire Arrow's container may be deemed unhealthy and get restarted.

Using Postman / Hoppscotch

The built-in GraphQL playground provides a nice development experience but if you need additional features such as sharing a request library with a team, it's possible to use external tools like Postman and Hoppscotch.

The GraphQL schema provided by Fire Arrow is very large and quite a bit bigger than typically expected by such tools. Auto-generating request libraries based on the GraphQL schema file may lead to errors.

Using the command line

Use curl to make quick tests:

curl -X POST http://localhost:8080/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-d '{
"query": "query { Me { reference } }"
}'

Auto-generated clients

Many programming frameworks support auto-generating clients from the GraphQL schema.

Fire Arrow implements the standard HL7 FHIR GraphQL schema, so an existing FHIR GraphQL library should also be compatible out of the box.