npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@holoscript/graphql-api

v0.1.2

Published

GraphQL API layer for HoloScript compiler with TypeGraphQL and Apollo Server

Readme

@holoscript/graphql-api

GraphQL API layer for HoloScript v6.1.0 compiler with TypeGraphQL and Apollo Server integration.

Features

Week 1 POC (v0.1.0)

  • Parse HoloScript code - parseHoloScript query returns AST as JSON
  • Compile to targets - compile mutation supports Unity, Babylon.js, R3F
  • List targets - listTargets query returns all 30+ available targets
  • Target information - getTargetInfo query provides detailed target metadata

Installation

# From HoloScript monorepo root
pnpm install

# Install package dependencies
cd packages/graphql-api
pnpm install

Quick Start

Start GraphQL Server

# Development mode with watch
pnpm dev

# Production build and start
pnpm build
pnpm start

Server will be available at http://localhost:4000 with GraphQL Playground enabled.

Example Queries

Parse HoloScript Code

query ParseExample {
  parseHoloScript(input: { code: "composition MyWorld { environment { sky_color: #87CEEB } }" }) {
    success
    ast
    errors {
      message
      location {
        line
        column
      }
    }
    warnings {
      message
    }
  }
}

Compile to Unity

mutation CompileToUnity {
  compile(
    input: {
      code: "composition MyWorld { environment { sky_color: #87CEEB } }"
      target: UNITY
      options: { minify: false, sourceMaps: true }
    }
  ) {
    success
    output
    errors {
      message
      phase
    }
    metadata {
      compilationTime
      outputSize
      targetVersion
    }
  }
}

List All Targets

query ListTargets {
  listTargets
}

Get Target Information

query GetUnityInfo {
  getTargetInfo(target: UNITY) {
    target
    name
    description
    version
    supportedFeatures
  }
}

Supported Compiler Targets (POC)

  • Unity - Unity game engine with C# scripting
  • Babylon.js - WebGL-based 3D engine for browsers
  • R3F - React Three Fiber renderer

Coming Soon (Week 2-4):

  • Unreal Engine
  • VRChat (Udon)
  • WebAssembly
  • Android (ARCore)
  • iOS (ARKit)
  • visionOS (Apple Vision Pro)
  • Godot Engine
  • OpenXR
  • And 8+ more targets

Architecture

@holoscript/graphql-api/
├── src/
│   ├── types/
│   │   └── GraphQLTypes.ts      # TypeGraphQL type definitions
│   ├── resolvers/
│   │   ├── QueryResolver.ts     # Queries (parse, list, getInfo)
│   │   └── CompilerResolver.ts  # Mutations (compile)
│   ├── index.ts                 # Main exports
│   └── server.ts                # Apollo Server setup
├── package.json
├── tsconfig.json
└── tsup.config.ts

Development Roadmap

✅ Week 1 (Current): POC

  • [x] Package structure
  • [x] TypeGraphQL resolvers (Query, Compiler)
  • [x] Apollo Server setup
  • [x] Unity/Babylon/R3F compilation
  • [ ] Test with GraphQL Playground

Week 2: Core Mutations

  • [ ] Batch compilation with DataLoader
  • [ ] All 30+ compiler targets
  • [ ] Performance optimizations

Week 3: Subscriptions

  • [ ] Real-time compilation progress
  • [ ] Live validation
  • [ ] Redis pub/sub

Week 4-6: Production Ready

  • [ ] Query complexity limits
  • [ ] Rate limiting
  • [ ] Authentication/Authorization
  • [ ] Caching strategy
  • [ ] Monitoring with Apollo Studio

Testing

# Run tests
pnpm test

# Run tests in watch mode
pnpm test:watch

Building

# Build for production
pnpm build

# Output: dist/index.{js,cjs,d.ts}
#         dist/server.{js,cjs,d.ts}

License

MIT

Related Packages

  • @holoscript/core - HoloScript compiler core
  • @holoscript/cli - Command-line interface
  • @holoscript/vscode-extension - VSCode extension

Contributing

See the main HoloScript repository for contribution guidelines.


Status: Week 1 POC ✅ Version: 0.1.0 Last Updated: 2026-02-26 From: HoloScript GraphQL Assessment (autonomous TODO execution)