Getting Started

Installation

Install Universal Data Layer and start the GraphQL server

Quick Start

The fastest way to try Universal Data Layer is using npx:

Terminal
npx universal-data-layer

This starts a GraphQL server at http://localhost:4000/graphql with a basic schema.

Installation

For local development, install UDL as a project dependency:

npm install universal-data-layer

Starting the Server

Once installed, start the GraphQL server:

npx universal-data-layer

Available Endpoints

Once the server is running, you'll have access to:

EndpointURLDescription
GraphQL APIhttp://localhost:4000/graphqlPOST queries here
GraphiQLhttp://localhost:4000/graphiqlInteractive query IDE

Configuration File

UDL uses a configuration file to define plugins and settings. Create a udl.config.ts file in your project root:

udl.config.ts
import { defineConfig } from 'universal-data-layer';

export const config = defineConfig({
  port: 4000,
  plugins: [],
});

The defineConfig helper provides TypeScript autocompletion and validation. Supported config file names:

  • udl.config.ts (recommended)
  • udl.config.js
  • udl.config.mjs

Next Steps