
Security News
Meet the Socket Team at RSAC and BSidesSF 2025
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.
vue-contentful-hook
Advanced tools
A hook to call the contentful API using GraphQl
Ideally you should pass env variables as token and spaceId
export interface Dummy<T, U> {
readonly dummyCollection: {
readonly total: number;
readonly skip: number;
readonly limit: number;
readonly items: readonly T[];
};
readonly someOtherDummyCollection: {
readonly total: number;
readonly skip: number;
readonly limit: number;
readonly items: readonly U[];
};
}
const query = `
{
dummyCollection {
items {
name
}
}
someOtherDummyCollection {
items {
name
}
}
}
`;
const { data } = useContentful<Dummy<string, number>>(query, {
token: "myToken",
spaceId: "mySpaceId",
});
// an array of strings
console.log("data", data.value?.dummyCollection.items);
// an array of numbers
console.log("data", data.value?.dummyCollection.items);
Lucien Bénié 💻 📖 |
This project follows the all-contributors specification. Contributions of any kind welcome!
1.3.1 (2022-03-30)
FAQs
A vue hook to fetch contentful data using GraphQL query
The npm package vue-contentful-hook receives a total of 1 weekly downloads. As such, vue-contentful-hook popularity was classified as not popular.
We found that vue-contentful-hook demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.
Security News
Biome's v2.0 beta introduces custom plugins, domain-specific linting, and type-aware rules while laying groundwork for HTML support and embedded language features in 2025.
Security News
Next.js has patched a critical vulnerability (CVE-2025-29927) that allowed attackers to bypass middleware-based authorization checks in self-hosted apps.