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

improve: LDP-2497: Add $ceApi helper and include query in server routes #224

Merged
merged 6 commits into from
Apr 24, 2024

Conversation

vloss3
Copy link
Contributor

@vloss3 vloss3 commented Apr 18, 2024

Solves #211

src/runtime/composables/useDrupalCe/index.ts Outdated Show resolved Hide resolved
src/runtime/composables/useDrupalCe/index.ts Show resolved Hide resolved
src/runtime/server/api/drupalCe.ts Outdated Show resolved Hide resolved
src/runtime/composables/useDrupalCe/index.ts Outdated Show resolved Hide resolved
if (config.addRequestFormat) {
useFetchOptions.query._format = 'custom_elements'
}
useFetchOptions.key = `page-${path}-${JSON.stringify(useFetchOptions.query)}`
Copy link
Contributor

@fago fago Apr 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if not provided, it will be generated based on the url and fetch options

--> let's better stick with the default!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keys are different on server and client for some reason so it re-fetches and fails with internal server error in a project

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

weird. let's check it in a follow-up then.

src/runtime/composables/useDrupalCe/index.ts Outdated Show resolved Hide resolved
src/runtime/composables/useDrupalCe/index.ts Outdated Show resolved Hide resolved
src/runtime/composables/useDrupalCe/index.ts Outdated Show resolved Hide resolved
@vloss3 vloss3 merged commit 5f7b885 into 2.x Apr 24, 2024
1 check passed
@vloss3 vloss3 deleted the feature/custom-fetch-instance branch April 24, 2024 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants