Skip to content
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

AutocompleteInput error #8

Closed
joshhopkins opened this issue Jan 4, 2020 · 6 comments
Closed

AutocompleteInput error #8

joshhopkins opened this issue Jan 4, 2020 · 6 comments

Comments

@joshhopkins
Copy link

joshhopkins commented Jan 4, 2020

AutocompleteInput broken: GraphQL error: field "q" not found in type: GraphQL_TYPE__bool_exp

@cpursley
Copy link
Contributor

cpursley commented Jan 6, 2020

That field type is just an example. Try using the actual field name in the filter definition.

@Steams
Copy link
Owner

Steams commented Jan 6, 2020

@joshhopkins Perhaps it was an issue on a previous commit but autocompleteInput seems to be working perfectly fine currently. If you update to the latest release of the lib (0.1.7) and are still having the issue, please post a snippet of the code causing the error.

@joshhopkins
Copy link
Author

@Steams thanks, just tested with 0.1.7. I should clarify that I'm populating the choices attributed with a list of related records using <ReferenceInput>.

This throws: undefined is not an object (evaluating 'i.type'):

<ReferenceInput source="post_id" reference="posts" validate={required()}>
    <AutocompleteInput optionText="title" optionValue="post_id" />
</ReferenceInput>

@joshhopkins
Copy link
Author

Solved. Not a bug, but a less obvious "feature" of react-admin. marmelab/react-admin#2615

@ghost
Copy link

ghost commented Sep 28, 2022

@cpursley
Copy link
Contributor

Thanks @zenomeki

Heads up that Hasura has taken over maintenance of this library: https://github.com/hasura/ra-data-hasura

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

3 participants