Introduction to GraphQL
Welcome to our GraphQL API documentation! In this guide, we'll introduce you to the basics of GraphQL and how it pertains to our authentication and account management system.
What is GraphQL?
GraphQL is a query language for your API and a runtime for executing those queries by using a type system you define for your data. It allows clients to request only the data they need, making it more efficient and flexible compared to traditional REST APIs.
Me Query
Authentication Representation
The me { }
query represents the authentication method. It allows users to query information about themselves while ensuring proper authentication and authorization.
Example:
me {
# Query fields related to user information
}
This query, when expanded with specific fields, allows you to access further details tied to your user account.
API calls are authenticated with the X-API-KEY
header containing an API key generated in the Blink Dashboard at dashboard.blink.sv. Find more about authentication in the Authentication section
Default Account Representation
Under the me query, the defaultAccount field represents what we refer to as the "master account." This is the primary account associated with the user, containing essential properties and settings.
Example:
me {
defaultAccount {
# Query fields related to the master account
}
}
By querying the defaultAccount, you can retrieve detailed information about your master account, such as account settings, preferences, and other key data points that define your interaction with our service.
Wallets Representation
The me { defaultAccount { wallets { } } }
query represents the wallets associated with the default account. Wallets are where balances and transactions are stored, providing a granular view of the user's financial activities.
Example:
me {
defaultAccount {
wallets {
# Query fields related to wallets
}
}
}
This query structure enables you to drill down into specific wallet details, such as transactions, balances, and other financial data, providing a comprehensive view of your financial standing and activity.