Skip to content

Query Fields

These are the top-level query fields in the schema.

me (Account)

The account identified by the access token used in the Authorization header.

release (Release)

Metadata for the release specified by the version argument.

Argument
Type
Description
versionString!required. Must be a major.minor.patch version number like “6.0.0”. The word “latest” will resolve to the latest full version of 5.x but is deprecated for Version 6.

releases ([Release])

List of all available releases.

search ([Icon])

Results for an icon query, using the same Algolia search engine that powers the Icon Gallery.

If this field resolves as null, it means there was a problem executing the search, such as attempting to search on a non-existent version of Font Awesome. The errors returned may include additional information.

Argument
Type
Description
versionString!required. Must be a major.minor.patch version number like “5.12.0”. The word “latest” will resolve to the latest full version of 5.x but is deprecated for Version 6.
queryString!required. A string of search terms, like “coff” or “coffee mug”
firstIntegerdefault: 15. Limit results to this number: the first “X” results.

Example:

This will return the first five results matching the query “coff” for Version 6.0.0.

search(version: "6.0.0", query: "coff", first: 5) { id }
{
"data": {
"search": [
{
"id": "coffin-cross"
},
{
"id": "coffin"
},
{
"id": "coffee-togo"
},
{
"id": "coffee-pot"
},
{
"id": "coffee"
}
]
}
}

Fuzzy Search vs. Finding an Icon by Name

The search field is intended for fuzzy searching. It does a lot more than just match search terms against the names of icons. That’s great for helping users to discover icons according to concepts or word associations. It also helps if you can’t remember the exact name of an icon: close enough is probably good enough!

When searching “coffee”, for example, it may help you discover that there are coffee-related icons beyond that familiar mug-saucer icon—which, by the way, is no longer called “coffee”! A search for “coffee” also finds coffee beans, coffee pots, to-go coffee cups, and more.

However, if you want to look up a specific icon by name, there’s no guarantee that it’ll turn up as the first search result, even if you search by its exact name. So if you’re looking to select a specific icon by name, use the icon field under a release instead of search.