FirmhouseClient
Client for accessing Firmhouse GraphQL api
Example
Type parameters
• TAccess extends Access
= storefront
Access type. (Will be inferred from the config)
Methods
rawRequest()
Sends an authenticated raw request to API. This can be used for custom field selections or bulk queries/mutations.
Parameters
• graphQLQuery: string
The GraphQL query
• variables?: Record
<string
, unknown
>
Variables to use in query
Returns
Promise
<unknown
>
The response from the API
Throws
NotFoundError - When there is an entity not found error in the response
ValidationError - When there are invalid fields
ServerError - When the request fails
Resources
Available with Storefront Access
carts
Cart methods
Returns
plans
Plan methods
Example
Returns
products
Product methods
Example
Returns
selfServiceCenterToken
SelfServiceCenterToken methods
Returns
Only Available with Write Access
invoices
Invoice methods
Returns
TAccess
extends write
? [invoices-resource
]../resources/(invoices.md) : never
projects
Project methods
Returns
TAccess
extends write
? [projects-resource
]../resources/(projects.md) : never
subscriptions
Subscription methods.
Returns
TAccess
extends write
? [subscriptions-resource
]../resources/(subscriptions.md) : never
Last updated