Search by

elephentity / graphql

hsimah

Experimental Framework-independent GraphQL integration for the Elephentity PHP runtime.

v0.17.0 2026-10-21 23:48 UTC

README

This is the source of truth. hsimah-services/elephentity-graphql-php is a read-only mirror of packages/graphql/ in hsimah-services/elephentity, kept for Composer and Packagist. Open issues and pull requests on elephentity.

elephentity-graphql-php

Framework-independent GraphQL integration for Elephentity's PHP runtime, extracted from Clog's standalone backend. It builds a webonyx/graphql-php schema without WordPress or WPGraphQL.

The Composer package name is elephentity/graphql. It requires PHP 8.3+, elephentity/runtime ^0.17 and webonyx/graphql-php ^15.0.

Components

  • SchemaBuilder: objects, inputs, interfaces, enums, connections and mutations.
  • Manifest: the compiled entity, query, field and mutation descriptions, generated by codegen-graphql-php.
  • Registration: maps those descriptions to resolver configurations.
  • Relay and Resolver: global IDs and connection results.

Storage stays behind the Elephentity runtime, so this package does not depend on SQLite; any storage adaptor works.

Behaviour

  • Global IDs are checked against the expected public GraphQL type on root lookups, mutations and relationship inputs. Raw row IDs remain accepted.
  • Connections support first and after; last and before are rejected explicitly. first: 0 returns an empty page and negative sizes are rejected.
  • A collection query's arguments appear in the schema under where and reach the query handler as plain arguments.
  • Query-only schemas omit the mutation root.

Tests

After installing Composer dependencies, run composer test with PHP 8.3 or later. The regression script can also use an existing dependency autoloader:

php tests/regressions.php /path/to/vendor/autoload.php

Provenance

docs/clog-source.json records the file hashes and Clog commit the source was extracted from; the inherited license is preserved in CLOG-LICENSE. Earlier compatibility evidence is in docs/runtime-compatibility.md.