Authenticating requests
All requests to the Pylon GraphQL API require authentication. Include your access token in theAuthorization header:
The GraphQL endpoint
The Pylon GraphQL API uses a single endpoint for all operations:- Production:
https://pylon.mortgage/graphql - Sandbox:
https://sandbox.pylon.mortgage/graphql
About queries
Queries allow you to ask for specific fields on objects. Here’s a simple query and its response: Query:Query fields
GraphQL queries are hierarchical and composed of fields. A field can be a scalar (like a string or number) or an object that contains its own fields.Arguments
You can pass arguments to fields. Arguments can be scalars or enums, and are used to filter or specify the data you want.About mutations
Mutations are operations that modify data. They follow the same structure as queries, but they always start withmutation:
Operation names
Operation names are meaningful and explicit names for your operations. They are only required in multi-operation documents, but using them is helpful for debugging and server-side logging.Variables
Variables make queries more powerful and reusable. Instead of hardcoding values, you can pass them as separate variables. Query:Making a call
You can make GraphQL calls usingcurl, any HTTP client, or a GraphQL client library.
Using curl
Using fetch (JavaScript)
Working with responses
Checking for errors
Always check for errors in the response:Partial data
GraphQL may return partial data even when some fields fail. Always check bothdata and errors:
Next steps
- Learn about variables and fragments
- Understand pagination
- Explore using GraphQL clients