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

Move Nav block fallback JavaScript API fetch call to Core Data and sideload entities into store #50002

Closed
getdave opened this issue Apr 21, 2023 · 0 comments · Fixed by #50032
Assignees
Labels
[Block] Navigation Affects the Navigation Block

Comments

@getdave
Copy link
Contributor

getdave commented Apr 21, 2023

Currently the API call to fetch fallbacks is inlined in the Nav block edit.js file. This needs to be moved into Core Data as a selector/resolver.

In addition, the endpoint should be called with ?_embed so that the full Nav Menu post object is returned in the _links section of the response.

We should then sideload the entity into the Core store with the aim of achieving a single network request to:

  • fetch the fallback ID
  • fetch the full Nav Menu Post data

Currently this requires two network requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants