Log in Start free trial β
Reference
Fontdue.jsGraphQLDemo templateGuides
WebflowWordpress + Lay ThemeWordpress + SempliceNext.js (App Router)Next.js (Pages Router)Python + FlaskInformation
Whatβs newFull-service website developmentManaging your font catalogVariable fontsFont licensesWebfontsCross-origin accessPayments with StripeTaxTest fontsTest modeManage your Fontdue subscriptionLaunching your siteTroubleshootingUpdates
Update 001Update 002Update 003Β© Fontdue, 2022
GraphQL API
GraphQL is a modern API language allowing you to efficiently query data from your Fontdue CMS.
A single GraphQL query can fetch anything we've defined in the schema, which provides you total flexibility in how you structure your site templates. Learn about writing GraphQL queries here.
Access your public GraphQL endpoint at:
https://your-site.fontdue.com/graphql
GraphQL Playground
Your site comes with a GraphQL playground to explore the API and make sample queries. When logged in to the Fontdue admin, find the link in the Tools menu.
Click on the green Schema button in the upper right to explore fields available to query.
Write queries and execute them in the left panel.
Example
query {
viewer {
fontCollections(first: 10) {
edges {
node {
name
fontStyles {
name
sku {
price {
amount
currency
}
}
}
}
}
}
}
}
GraphQL is a powerful way to query your data. We are driving deep into the data and fetching only the fields we want.
Note on Connections
You'll notice some of the fields like fontCollections
resolve to a Connection
type. This is primarily used for implementing Pagination, which becomes necessary when your collection grows.
Many lists resolve to an array rather than a Connection (e.g. Viewer.licenses
as well as FontCollection.fontStyles
). In those cases we do not expect the size of the list to ever require pagination.