Skip to content

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

Closed
@thekevinbrown

Description

@thekevinbrown

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[].

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions