diff --git a/packages/druxt/src/stores/druxt.js b/packages/druxt/src/stores/druxt.js index 0db566eee..883036ac3 100644 --- a/packages/druxt/src/stores/druxt.js +++ b/packages/druxt/src/stores/druxt.js @@ -167,10 +167,10 @@ const DruxtStore = ({ store }) => { * * @example @lang js * // Flush all resources. - * this.$store.commit('druxt/flushResources', {}) + * this.$store.commit('druxt/flushResource', {}) * * // Flush target resource. - * this.$store.commit('druxt/flushResources', { id, type, prefix, hash }) + * this.$store.commit('druxt/flushResource', { id, type, prefix, hash }) */ flushResource (state, { type, id, prefix }) { if (!type) Vue.set(state, 'resources', {}) diff --git a/packages/entity/src/components/DruxtEntity.vue b/packages/entity/src/components/DruxtEntity.vue index ad18feaef..23ccab4d8 100644 --- a/packages/entity/src/components/DruxtEntity.vue +++ b/packages/entity/src/components/DruxtEntity.vue @@ -511,7 +511,8 @@ export default { * property. * * @typedef {object} ModuleSettings - * @param {object} query - Entity Query settings: + * @param {object} query - Entity query settings: + * @param {(boolean|function)} query.bypassCache - Whether to pull the data from the Vuex store or from the JSON:API. * @param {(string[]|array[])} query.fields - An array or arrays of fields to filter from the JSON:API Resources. * @param {string[]} query.include - An array of relationships to include alongside the JSON:API Resource. * @param {boolean} query.schema - Whether to automatically detect fields to filter, per the Display mode. @@ -521,11 +522,12 @@ export default { * export default { * druxt: { * query: { + * bypassCache: ({ $store }) => $store.$auth.loggedIn, * fields: [['title'], ['user--user', ['display_name']]], * include: ['uid'] * schema: true, * }, - * } + * }, * } * * @example DruxtEntity component with settings @lang vue @@ -535,6 +537,7 @@ export default { * :uuid="uuid" * :settings="{ * query: { + * bypassCache: true, * fields: [['title'], ['user--user', ['display_name']]], * include: ['uid'] * schema: true, diff --git a/packages/views/src/components/DruxtView.vue b/packages/views/src/components/DruxtView.vue index ea071699d..3159645e2 100644 --- a/packages/views/src/components/DruxtView.vue +++ b/packages/views/src/components/DruxtView.vue @@ -735,28 +735,40 @@ export default { * or the Wrapper component `druxt` object. * * @typedef {object} ModuleSettings - * @param {boolean} bundleFilter - Whether to automatically detect Resource types to filter, based on the View `bundle` filter. - * @param {string[]} fields - An array of fields to filter from the JSON:API Views Resource types. - * @param {string[]} resourceTypes - An array of Resource types to be used by the Fields filter. + * @param {object} query - View results query settings: + * @param {(boolean|function)} query.bypassCache - Whether to pull the data from the Vuex store or from the JSON:API. + * @param {boolean} query.bundleFilter - Whether to automatically detect Resource types to filter, based on the View `bundle` filter. + * @param {string[]} query.fields - An array of fields to filter from the JSON:API Views Resource types. + * @param {string[]} query.resourceTypes - An array of Resource types to be used by the Fields filter. * - * @example @lang js - * { - * bundleFilter: false, - * fields: [], - * resourceTypes: [] - * } - * - * @example @lang vue + * @example DruxtView Wrapper component @lang vue *