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.


Queries

Learn how to read data using the query request in the Business NXT schema. For data modifications, refer to Mutation Type documentation.

Mutations

Guides you on using mutations for inserts, updates, deletes, and running tasks within a GraphQL schema.

Async queries

Async queries allow for the execution of GraphQL queries and mutations asynchronously, useful for long-running operations that might exceed timeouts.

Date and time fields

Date and time fields API documentation - describes field formats, conversion examples, and usage in GraphQL queries and mutations.

Bitflags

Bitflags allow managing preferences and statuses using bit flags in integer columns. GraphQL queries and mutations simplify interacting with these fields.

Last modified September 24, 2024