Skip to content

Phase 1.5: add GraphQL example contract + mock fixture #12

Description

@ToryMic

Goal

Add a second runnable example contract so adopters can see SchemaLock against a
Stellar-flavoured GraphQL backend, not just the escrow REST mock.

Scope

  • Add examples/graphql_example.yaml: a contract for a small mock GraphQL
    backend with at least one query endpoint and one mutation endpoint.
  • Add examples/graphql_mock.py: a FastAPI/Starlette app serving /graphql
    with a fixed error envelope (e.g. errors[{message, path, extensions.code}]).
  • Wire the new example into the Python and Rust parity fixtures so
    scripts/parity_check.py covers it too.
  • Update README.md "What it checks" and the quick-start to reference the new
    example.

Why

Phase 1 currently ships a single escrow REST example. Stellar Wave backends
increasingly expose GraphQL endpoints (per stellarmarket-labs and Talenttrust
patterns), and the PRD calls GraphQL error-shape validation a Phase 2 goal — a
GraphQL example fixture de-risks that work and shows the tool working on the
shape Wave teams actually use.

Acceptance criteria

  • examples/graphql_example.yaml + examples/graphql_mock.py run standalone
  • schemalock test --config examples/graphql_example.yaml --base-url <url> passes locally
  • Parity gate (scripts/parity_check.py) covers the new fixture; Python and Rust agree byte-for-byte
  • README quick-start mentions the GraphQL example

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    drips-waveStellar Wave Program — Drips issueenhancementNew feature or requesttrivialWorth 100 Points (Base)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions