API schema is undefined React Admin with Hydra problem with introspect
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- next.js, react, typescript
Research direction
Start with src/hydra/dataProvider.ts and reproduce the reported setup using Next.js 13.4.19, React Admin, and a Hydra backend, focusing on the introspection result and undefined apiSchema. Done means the API data loads without the hack, chips fields are populated, and editing does not cause the data to disappear.
Written by the indexing model from the issue text.
Description
We recently decided to use React Admin with API Platform for our internal app. React Admin linked your repo in their documentation, with a comment that this is a suitable dataProvider for our set up. Unfortunately, it doesn’t work as we hoped, and I wonder why.
Let me guide you through our case.
We have configured React admin with Next.js (v 13.4.19) with Hydra (JSON-LD) as the backend.
- At first, we implemented dataProvider as it is, regarding to the repo linked in the documentation:
https://github.com/api-platform/admin/blob/main/src/hydra/dataProvider.ts
but we were not able to display the API data at all, with the error as on the screen nr 1
- Then mostly for debugging purposes, we have added a hacky solution in the code to make apiSchema optional: screen nr 2 and we were able to display some data and even create some views as usersList, singleUser, userEdit but not everything worked as one might expect. Check out the chips fields it remains empty: screen nr 3.
- Then we tried to edit the user in edit view: screen 4
- After the editing for few seconds you can see the changes on usersList, even the chips fields work: screen 5
- And then it all disappears with an error message: screen 6
From what we have observed, there is an introspection issue and apiSchema returns an undefined value when we try to log it.
- Dominant language
- TypeScript
- Stars
- 516
- Forks
- 134
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from api-platform/admin
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
api-platform/admin#616 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 64/100
api-platform/admin#660 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 50/100
api-platform/admin#659 · 1 reaction ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
api-platform/admin#631 · 6 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
api-platform/admin#626 · 1 comment · 1 reaction ·
All issues in api-platform/admin
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
safetrustcr/dApp-SafeTrust#426 ·
-
area:workflow bug ready-for-agent
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
fil-donadoni/tolaria#4409 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
Fission-AI/OpenSpec#1960 ·
-
Add dependabot Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
corsairdev/corsair#1764 ·