GraphQL Schema

Details the Business NXT GraphQL schema, Relay-like, exposing system and company databases with types named after tables, supporting queries and mutations.

The Business NXT data model is exposed through a GraphQL schema. The schema defines the set of types that describe the set of possible data you can query from the service. Schemas are built with types (scalar, enumerations, union, input), objects, lists, arguments, intefaces, and other concepts. You can learn more about schemas and types here.

Business NXT GraphQL uses a Relay-like schema, although not fully compliant. Relay is a specification for defining the GraphQL schema used at Facebook (where GraphQL was created) and open sourced. You can read about it here. The VBNXT GraphQL implementation differs from the Relay specification by not providing the Node base type and the edges field for a type.

The Business NXT data model is formed of two database types:

  • a system database, containing information such as companies and company groups, users and user groups, folders, windows, active session, and various other data that applies to the whole application
  • a company database, containing company specific information (such as associates, general ledger accounts, orders, vouchers, and many others)

Every table in the database model, regardless it’s a system or company table, is exposed in the schema with a type that has the same name as the table (the name that appears in the model, not the actual SQL name in the database). This type includes the table columns and their type, as well as relations to other columns. For instance, the table for the general leger accounts is available through the type called GeneralLedgerAccount. However, the schema defines different sets of types for queries and mutations.

Last modified September 24, 2024