Replies: 15 comments 40 replies
-
Thank you for handling this rewrite! Is there an ETA on a release candidate? |
Beta Was this translation helpful? Give feedback.
-
First Release CandidateHello everyone! I'm actually quite late in getting back to you, sorry for that. First of all, a big compliment to @sandros94 and @casualmatt for their work. Our plan is to release the new version after successful testing in the I have just released the first RC of The RC can be installed under In the future, the new documentation will then run on the main domain and the old one at Package on NPM: https://www.npmjs.com/package/nuxt-directus-next |
Beta Was this translation helpful? Give feedback.
-
Hello,
|
Beta Was this translation helpful? Give feedback.
-
Is it planned to support anything like the transform property from useAsyncData? |
Beta Was this translation helpful? Give feedback.
-
I can't retrieve relational fields. Request: const data = await readItems('collection', {
query: {
fields: [
'id',
'relation.relational_field'
],
},
}); And i get only this: {
"id": "xxxxx",
"relation": "[only the relational-item-id not the data]"
} Is this a bug? When i try it with the rest it works so i don't think its a Directus problem. |
Beta Was this translation helpful? Give feedback.
-
With no more
|
Beta Was this translation helpful? Give feedback.
-
Is there a higher-level method for aggregate()? I managed to grab it by exposing:
but it feels like a hack. Thanks for the rewrite, I’m enjoying using the library! |
Beta Was this translation helpful? Give feedback.
-
Just released Notable changes
Notes
ExamplesCheckout the |
Beta Was this translation helpful? Give feedback.
-
Notable ChangesReturn types are now manually handled, this both fixes a number of technical issues as well makes the module run easier. Please open up any issue with a reproduction, since this was mainly a manual operation and I could have missed something.
|
Beta Was this translation helpful? Give feedback.
-
I’m getting an error when trying to implement the nuxtDirectus provider for
Is the provider exposed for use? |
Beta Was this translation helpful? Give feedback.
-
Hey, is it possible to receive activity (especially comments) with the new version? |
Beta Was this translation helpful? Give feedback.
-
Hi, i tried to use the This is my Page: <script setup lang="ts">
const { connect } = useDirectusRealtime();
try {
connect();
} catch (e) {
console.log(e);
}
definePageMeta({
middleware: 'auth',
layout: 'ams',
});
</script>
<template>
<div>
<h1>Websocket</h1>
</div>
</template> I use Directus V10.12.1. Do you know if this error is module, directus or me related? |
Beta Was this translation helpful? Give feedback.
-
I have another problem. When i want to make a fetch. For example: const dynamicFilter = computed(() => some_logic)
const { data } = await readAsyncItems('collection', {
query: {
fields: ['id'],
filter: {
...dynamicFilter.value,
status: { _eq: 'published' },
},
},
watch: [dynamicFilter],
}) So, when the data is now refetched because of the watch param, it use the initial dynamicFilter value and not the new/updated value. Is this a problem related to useAsyncData or the composable of the module? |
Beta Was this translation helpful? Give feedback.
-
Hello i'm having some problems getting meta data when calling readItems composable. I'm currently using version 0.0.15 and when I try to specify the query object with meta like this: Is it possible to access the meta property ? Or does it maybe have to do something with me wrapping the composable with useAsyncData ? API call using readItems composable: const {
data: transactions,
error: transactionError,
status: fetchingTransactions,
} = await useAsyncData<ApiTransaction[]>(
"transactionsCollection",
() =>
readItems("transactions", {
filter: {
user: {
_eq: user.value?.id,
},
},
limit: 4,
sort: ["-date_created"],
page: transactionsPage.value,
meta: "filter_count",
}),
{
watch: [transactionsPage],
}
); |
Beta Was this translation helpful? Give feedback.
-
Hi everyone, You can find an update on this RFC in a new discussion post that I've just published at #271. |
Beta Was this translation helpful? Give feedback.
-
--> Updated info are available at the following discussion #271
How to use it
Install
nuxt.config.ts
and set your url.env
Documentation
Currently the new documentation is Work In Progress, so not every page is complete.
But some starting points are:
Be aware
Although obvious, you must expect things to not work as expected and encounter some bugs. So, if you intend to use this in production, be conscious you are doing it at your own risk.
Since we are in pre-release, any support by providing links to reproducible bugs will help us get closer to a stable release.
What this new version is currently about
As some of you might know I started rewriting the
nuxt-directus
module by wrapping the Directus SDK, both providing simple everyday-use functionalities, as well as simplifying repetitive tasks and exposing more complex ones.Thanks again to @Intevel and @casualmatt for the support and decision making.
Things that start with
NEW
are new feature implemented in the module that weren't present in the OG version.Release notes during this rewrite
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
✅ DONE
useDirectus
useDirectusAuth
useDirectusCollections
useDirectusFiles
getThumbnail
(missing intentionally, see notes below)useDirectusItems
useDirectusNotifications
useDirectusTokens
useDirectusUsers
useDirectusRevisions
useAsyncData
forreadAsync**
functions. Check this comment for more infooFetch
andWebsockets
support with possibility to customize them.@nuxt/image
, with transforms and automatic sizing from Directus APIdirectus.moduleConfig.readMeQuery
in yournuxt.config.ts
~/server
for server side operations (docs are on the way).⬜ TODO
useDirectusVersions
useDirectusTranslations
😅 Known issues
nuxt-directus-next
releases, please refer to theplayground
to see examples on the current usage📑Notes
baseURL
at runtime. To workaround that issue, until it is fixed, I've added a custom Image provider namednuxt-directus
that takes care of picking up yourdirectus.url
automatically and use that, even if you pass it viaNUXT_PUBLIC_DIRECTUS_URL
env variable.Beta Was this translation helpful? Give feedback.
All reactions