added the Todos query
This commit is contained in:
parent
842cd376cc
commit
8d4b217c99
@ -1,6 +1,10 @@
|
||||
query Projects {
|
||||
query Todos {
|
||||
directus_todos {
|
||||
id
|
||||
task
|
||||
user_created {
|
||||
first_name
|
||||
last_name
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,6 @@
|
||||
import axios from 'axios';
|
||||
import fs from 'fs';
|
||||
import dotenv from 'dotenv';
|
||||
|
||||
dotenv.config();
|
||||
|
||||
export async function fetchSchemas() {
|
||||
|
@ -20,7 +20,8 @@ const directus = introspect.graphql({
|
||||
apiNamespace: 'directus',
|
||||
loadSchemaFromString: directusSchema,
|
||||
url: 'https://directus.andert.me/graphql',
|
||||
headers: (builder) => builder.addStaticHeader('Authorization', 'Bearer Bv5RknRvv5AZouxcYdBJgVOe3ZC493Y3')
|
||||
headers: (builder) => builder
|
||||
.addStaticHeader('Authorization', 'Bearer Bv5RknRvv5AZouxcYdBJgVOe3ZC493Y3')
|
||||
});
|
||||
|
||||
// configureWunderGraph emits the configuration
|
||||
|
@ -1,9 +1,9 @@
|
||||
<script lang="ts">
|
||||
import { createQuery } from "../lib/wundergraph";
|
||||
|
||||
const dragonsQuery = createQuery({
|
||||
operationName: "Dragons",
|
||||
});
|
||||
// const dragonsQuery = createQuery({
|
||||
// operationName: "Dragons",
|
||||
// });
|
||||
const projectsQuery = createQuery({
|
||||
operationName: "Projects",
|
||||
});
|
||||
@ -12,7 +12,7 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
Dragons
|
||||
<!-- Dragons
|
||||
<div class="results">
|
||||
{#if $dragonsQuery.isLoading}
|
||||
<p>Loading...</p>
|
||||
@ -21,7 +21,7 @@ Dragons
|
||||
{:else}
|
||||
<pre>{JSON.stringify($dragonsQuery.data, null, 2)}</pre>
|
||||
{/if}
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
Projects
|
||||
<div class="results">
|
||||
@ -34,7 +34,7 @@ Projects
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
Tasks
|
||||
Todos
|
||||
<div class="results">
|
||||
{#if $todosQuery.isLoading}
|
||||
<p>Loading...</p>
|
||||
|
Loading…
Reference in New Issue
Block a user