mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Added useQuery tanstack-vue test case
This commit is contained in:
@@ -112,3 +112,6 @@ nodes
|
||||
| testReactRelay.tsx:136:16:136:39 | readFra ... y, key) | semmle.label | readFra ... y, key) |
|
||||
| testReactRelay.tsx:137:50:137:53 | data | semmle.label | data |
|
||||
subpaths
|
||||
testFailures
|
||||
| test.vue:10:87:10:97 | // $ Source | Missing result: Source |
|
||||
| test.vue:22:31:22:53 | <!--$ Alert[js/xss] --> | Missing result: Alert[js/xss] |
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
<script>
|
||||
import { useQuery, VueQueryClientProvider } from "@tanstack/vue-query";
|
||||
|
||||
|
||||
export default {
|
||||
data() {
|
||||
const { isPending, isError, isFetching, data, error } = useQuery({
|
||||
queryKey: ["post"],
|
||||
queryFn: async () => {
|
||||
const response = await fetch("https://jsonplaceholder.typicode.com/posts/1"); // $ Source
|
||||
return response.json();
|
||||
},
|
||||
});
|
||||
|
||||
return { data : data };
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VueQueryClientProvider :client="queryClient">
|
||||
<div v-html="data"></div> <!--$ Alert[js/xss] -->
|
||||
</VueQueryClientProvider>
|
||||
</template>
|
||||
Reference in New Issue
Block a user