Skip to content

fix: improve composeDirective error message#3282

Merged
dariuszkuc merged 2 commits intomainfrom
fix_compose_directive_errors
Jun 25, 2025
Merged

fix: improve composeDirective error message#3282
dariuszkuc merged 2 commits intomainfrom
fix_compose_directive_errors

Conversation

@dariuszkuc
Copy link
Member

Since we cannot easily fix incorrect directive definition (#3281) without breaking our clients. This PR improves error messages when @composeDirective arguments are NULL or empty strings.

Previous message on undefined/null argument value

Cannot read properties of undefined (reading '0')

New message

Argument to @composeDirective in subgraph "${sg.name}" cannot be NULL or an empty String

Since we cannot easily fix incorrect directive definition (#3281) without breaking our clients. This PR improves error messages when `@composeDirective` arguments are NULL or empty strings.

Previous message on undefined/null argument value

`Cannot read properties of undefined (reading '0')`

New message

`Argument to @composeDirective in subgraph "${sg.name}" cannot be NULL or an empty String`
@dariuszkuc dariuszkuc requested a review from a team as a code owner June 25, 2025 17:47
@changeset-bot
Copy link

changeset-bot bot commented Jun 25, 2025

⚠️ No Changeset found

Latest commit: bb248c4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jun 25, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@apollo-librarian
Copy link

apollo-librarian bot commented Jun 25, 2025

✅ Docs preview ready

The preview is ready to be viewed. View the preview

File Changes

0 new, 1 changed, 0 removed
* (developer-tools)/apollo-mcp-server/(latest)/best-practices.mdx

Build ID: 8418da277dc72e7f065113c6

URL: https://www.apollographql.com/docs/deploy-preview/8418da277dc72e7f065113c6

@dariuszkuc dariuszkuc merged commit 7e29fe5 into main Jun 25, 2025
17 checks passed
@dariuszkuc dariuszkuc deleted the fix_compose_directive_errors branch June 25, 2025 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants