Skip to content

Custom Query with [String] return type generates String return type instead. #1725

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
thekevinbrown opened this issue Mar 25, 2025 · 0 comments

Comments

@thekevinbrown
Copy link
Member

thekevinbrown commented Mar 25, 2025

Describe the bug
When defining a custom query, if you define the getType value as () => [String] the custom query ends up with a String return type in the schema.

To Reproduce

graphweaverMetadata.addQuery({
	name: 'test',
	getType: () => [String],
	resolver: () => ['a', 'b'],
});

Expected behavior
Expected to be able to query { test } and get back ["a", "b"] in the result.

Actual behavior
test is correctly created in the schema, but the return type is generated as String instead of String[].

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

No branches or pull requests

1 participant