Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

mcp: mock schema is invalid GraphQL, so schema_* tests pass on a parse error

Open
#821 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@Starefossen is already working on this.

Since Oct 28, 2026.

  • #822 by @Starefossen — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
go, graphql
Domain
cli, testing

Research direction

Read internal/mcp/client/mock_client.go and the schema_* subtests in internal/mcp/server_test.go. First inspect the mock schema parse failure and how the tests handle tool errors. Define the missing GraphQL types and make the tests fail on tool errors; done when the schema parses and the tests verify successful tool results. An open linked pull request (#822) is already addressing this work.

Written by the indexing model from the issue text.

Description

The mock schema in internal/mcp/client/mock_client.go references about 35 types it never defines, for example TeamEnvironment, TeamConnection and Time. Parsing fails with Undefined type TeamEnvironment.

The schema_* subtests in internal/mcp/server_test.go therefore only ever receive the parse error. They still pass because they check for a substring or a non-empty result, and the error text matches. For example, schema_list_queries looks for "me", which appears in "schema".

Fix: define the missing types in the mock, and make the tests fail when a tool returns an error.

Dominant language
Go
Stars
2
Forks
5
Avg merge
3h 49m
Merged PRs (30d)
34

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nais/cli

All issues in nais/cli

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.