Skip to main content

Application types

Perfai scans four kinds of application. Each one is counted in its own unit, and the number on your app page uses that unit.

REST

Counted in endpoints. One endpoint is one method and path, such as GET /orders/{id}.

Website

Counted in pages. One page is one page template, however many URLs use it.

GraphQL

Counted in operations. One operation is one root query or mutation in your schema.

Hybrid

An app with both endpoints and pages. It’s reported as both, for example 8 endpoints · 2 pages.

What one unit means

Endpoints

An endpoint is one HTTP method on one path. GET /orders and POST /orders are two endpoints. Path parameters are part of the path, so GET /orders/{id} is one endpoint however many orders exist.

Pages

A page is a page template, not a visited URL. If your site serves /books/1024 and /books/1025, both are the same template, /books/{id}, and count as one page. This keeps the count stable as your content grows.

Operations

A GraphQL app usually sits behind a single HTTP endpoint, such as POST /graphql. Counting that endpoint would report every GraphQL app as one. Perfai counts the root operations in your schema instead, so an app with 30 queries and 12 mutations counts as 42 operations.
Operation names are case-sensitive. connectorActivate and ConnectorActivate are two operations, because GraphQL treats them as two.

What isn’t counted

Two things are tested or listed but left out of the headline number. Targets Perfai adds for its own checks. Some checks apply to a whole site, such as security headers, cookies and CORS. When the crawl found no page to run them against, Perfai adds the site root (/) as a target. It’s tested, but it isn’t counted, because it isn’t something the crawl found in your app. For the same reason, the site root is never counted as a page: every web app is served there. GraphQL subscriptions. Subscriptions are part of your schema, so they’re listed with your other operations. They aren’t counted, because a subscription runs over a long-lived connection that Perfai has no way to test yet. Every coverage percentage divides by the headline number, so counting a surface that can’t be tested would lower your coverage for a reason you can’t fix.

How the app type is decided

You don’t declare the app type. Perfai decides it from what it finds:
  • REST is the default.
  • GraphQL is set when Perfai detects a GraphQL endpoint or schema. Supplying your schema when you add the app is the most reliable way.
  • Website is set from what the first map finds. When your app serves more server-rendered pages than backend calls, it’s typed as a website. The type is never decided from the landing page alone.
The number on your app page follows what Perfai actually found, not the type label. A REST app that also serves pages shows both endpoints and pages.

Changing the type

If the type is wrong, open the app, go to Edit App, and choose REST, GraphQL or SSR under API Type. SSR is the website type. Perfai keeps your choice and doesn’t overwrite it on later scans.