πŸ““

GraphQL

Reference

πŸ““Fontdue.jsπŸ““GraphQLπŸ““Demo template

Guides

πŸ““WebflowπŸ““Wordpress + Lay ThemeπŸ““Wordpress + SempliceπŸ““Next.js (App Router)πŸ““Next.js (Pages Router)

Information

πŸ““Full-service website developmentπŸ““Managing your font catalogπŸ““Variable fontsπŸ““Font licensesπŸ““WebfontsπŸ““Cross-origin accessπŸ““Payments with StripeπŸ““TaxπŸ““Test fontsπŸ““Test modeπŸ““Manage your Fontdue subscriptionπŸ““Launching your siteπŸ““TroubleshootingπŸ““Customize the Address fields

Updates

πŸ““What’s newπŸ““Update 001πŸ““Update 002πŸ““Update 003πŸ““Update 004πŸ““Update 005
⚑
Start free trial β†’

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

image

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.

  • GraphQL API
  • GraphQL Playground
  • Example
  • Note on Connections