updated bb compilation, various improvements
This commit is contained in:
parent
1329586540
commit
938c37f9de
@ -1,21 +1,3 @@
|
|||||||
[resolvers.deleteList]
|
|
||||||
operation_name = "deleteList"
|
|
||||||
|
|
||||||
[resolvers.deleteList.resolver]
|
|
||||||
command_type = "SQLDelete"
|
|
||||||
|
|
||||||
[resolvers.deleteList.resolver.command]
|
|
||||||
table = "List"
|
|
||||||
columns = []
|
|
||||||
modify_values = []
|
|
||||||
aggregate_result = true
|
|
||||||
|
|
||||||
[[resolvers.deleteList.resolver.command.where_clauses]]
|
|
||||||
table = "List"
|
|
||||||
column = "id"
|
|
||||||
condition_str = "= '$id'"
|
|
||||||
index = ""
|
|
||||||
|
|
||||||
[resolvers.createList]
|
[resolvers.createList]
|
||||||
operation_name = "createList"
|
operation_name = "createList"
|
||||||
|
|
||||||
@ -36,6 +18,24 @@ value = "'$title'"
|
|||||||
column = "user_username"
|
column = "user_username"
|
||||||
value = "'$user.$username'"
|
value = "'$user.$username'"
|
||||||
|
|
||||||
|
[resolvers.deleteTask]
|
||||||
|
operation_name = "deleteTask"
|
||||||
|
|
||||||
|
[resolvers.deleteTask.resolver]
|
||||||
|
command_type = "SQLDelete"
|
||||||
|
|
||||||
|
[resolvers.deleteTask.resolver.command]
|
||||||
|
table = "Task"
|
||||||
|
columns = []
|
||||||
|
modify_values = []
|
||||||
|
aggregate_result = true
|
||||||
|
|
||||||
|
[[resolvers.deleteTask.resolver.command.where_clauses]]
|
||||||
|
table = "Task"
|
||||||
|
column = "id"
|
||||||
|
condition_str = "= '$id'"
|
||||||
|
index = ""
|
||||||
|
|
||||||
[resolvers.updateTask]
|
[resolvers.updateTask]
|
||||||
operation_name = "updateTask"
|
operation_name = "updateTask"
|
||||||
|
|
||||||
@ -57,7 +57,7 @@ value = "'$description'"
|
|||||||
|
|
||||||
[[resolvers.updateTask.resolver.command.modify_values]]
|
[[resolvers.updateTask.resolver.command.modify_values]]
|
||||||
column = "completed"
|
column = "completed"
|
||||||
value = "$completed"
|
value = "'$completed'"
|
||||||
|
|
||||||
[[resolvers.updateTask.resolver.command.modify_values]]
|
[[resolvers.updateTask.resolver.command.modify_values]]
|
||||||
column = "list_id"
|
column = "list_id"
|
||||||
@ -69,6 +69,24 @@ column = "id"
|
|||||||
condition_str = "= '$id'"
|
condition_str = "= '$id'"
|
||||||
index = ""
|
index = ""
|
||||||
|
|
||||||
|
[resolvers.deleteList]
|
||||||
|
operation_name = "deleteList"
|
||||||
|
|
||||||
|
[resolvers.deleteList.resolver]
|
||||||
|
command_type = "SQLDelete"
|
||||||
|
|
||||||
|
[resolvers.deleteList.resolver.command]
|
||||||
|
table = "List"
|
||||||
|
columns = []
|
||||||
|
modify_values = []
|
||||||
|
aggregate_result = true
|
||||||
|
|
||||||
|
[[resolvers.deleteList.resolver.command.where_clauses]]
|
||||||
|
table = "List"
|
||||||
|
column = "id"
|
||||||
|
condition_str = "= '$id'"
|
||||||
|
index = ""
|
||||||
|
|
||||||
[resolvers.createTask]
|
[resolvers.createTask]
|
||||||
operation_name = "createTask"
|
operation_name = "createTask"
|
||||||
|
|
||||||
@ -91,7 +109,7 @@ value = "'$description'"
|
|||||||
|
|
||||||
[[resolvers.createTask.resolver.command.modify_values]]
|
[[resolvers.createTask.resolver.command.modify_values]]
|
||||||
column = "completed"
|
column = "completed"
|
||||||
value = "$completed"
|
value = "'$completed'"
|
||||||
|
|
||||||
[[resolvers.createTask.resolver.command.modify_values]]
|
[[resolvers.createTask.resolver.command.modify_values]]
|
||||||
column = "list_id"
|
column = "list_id"
|
||||||
@ -101,6 +119,26 @@ value = "'$list.$id'"
|
|||||||
column = "user_username"
|
column = "user_username"
|
||||||
value = "'$user.$username'"
|
value = "'$user.$username'"
|
||||||
|
|
||||||
|
[resolvers.createUser]
|
||||||
|
operation_name = "createUser"
|
||||||
|
|
||||||
|
[resolvers.createUser.resolver]
|
||||||
|
command_type = "SQLInsert"
|
||||||
|
|
||||||
|
[resolvers.createUser.resolver.command]
|
||||||
|
table = "User"
|
||||||
|
columns = []
|
||||||
|
where_clauses = []
|
||||||
|
aggregate_result = true
|
||||||
|
|
||||||
|
[[resolvers.createUser.resolver.command.modify_values]]
|
||||||
|
column = "username"
|
||||||
|
value = "'$username'"
|
||||||
|
|
||||||
|
[[resolvers.createUser.resolver.command.modify_values]]
|
||||||
|
column = "name"
|
||||||
|
value = "'$name'"
|
||||||
|
|
||||||
[resolvers.updateList]
|
[resolvers.updateList]
|
||||||
operation_name = "updateList"
|
operation_name = "updateList"
|
||||||
|
|
||||||
@ -122,44 +160,6 @@ column = "id"
|
|||||||
condition_str = "= '$id'"
|
condition_str = "= '$id'"
|
||||||
index = ""
|
index = ""
|
||||||
|
|
||||||
[resolvers.deleteTask]
|
|
||||||
operation_name = "deleteTask"
|
|
||||||
|
|
||||||
[resolvers.deleteTask.resolver]
|
|
||||||
command_type = "SQLDelete"
|
|
||||||
|
|
||||||
[resolvers.deleteTask.resolver.command]
|
|
||||||
table = "Task"
|
|
||||||
columns = []
|
|
||||||
modify_values = []
|
|
||||||
aggregate_result = true
|
|
||||||
|
|
||||||
[[resolvers.deleteTask.resolver.command.where_clauses]]
|
|
||||||
table = "Task"
|
|
||||||
column = "id"
|
|
||||||
condition_str = "= '$id'"
|
|
||||||
index = ""
|
|
||||||
|
|
||||||
[resolvers.createUser]
|
|
||||||
operation_name = "createUser"
|
|
||||||
|
|
||||||
[resolvers.createUser.resolver]
|
|
||||||
command_type = "SQLInsert"
|
|
||||||
|
|
||||||
[resolvers.createUser.resolver.command]
|
|
||||||
table = "User"
|
|
||||||
columns = []
|
|
||||||
where_clauses = []
|
|
||||||
aggregate_result = true
|
|
||||||
|
|
||||||
[[resolvers.createUser.resolver.command.modify_values]]
|
|
||||||
column = "username"
|
|
||||||
value = "'$username'"
|
|
||||||
|
|
||||||
[[resolvers.createUser.resolver.command.modify_values]]
|
|
||||||
column = "name"
|
|
||||||
value = "'$name'"
|
|
||||||
|
|
||||||
[resolvers.getUser]
|
[resolvers.getUser]
|
||||||
operation_name = "getUser"
|
operation_name = "getUser"
|
||||||
|
|
||||||
|
5
bbconf/compile.sh
Executable file
5
bbconf/compile.sh
Executable file
@ -0,0 +1,5 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Compile the todo schema.
|
||||||
|
#
|
||||||
|
cargo run --manifest-path=../../../bbc/Cargo.toml -- --prefix=bb_todo -f todo_schema.graphql
|
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
<div id="list-container">
|
<div id="list-container">
|
||||||
<transition-group name="list" tag="div">
|
<transition-group name="list" tag="div">
|
||||||
<div class="list-item" v-for="list in gStore.lists" :key="list.id">
|
<div class="list-item" v-for="list in gStore.lists" :key="list.id" :id="`list-${list.id}`">
|
||||||
<div class="item-v-container">
|
<div class="item-v-container">
|
||||||
<input class="item-title" type="text" @blur="saveList(list)" v-model="list.title">
|
<input class="item-title" type="text" @blur="saveList(list)" v-model="list.title">
|
||||||
</div>
|
</div>
|
||||||
@ -147,6 +147,19 @@ export default {
|
|||||||
title: "Enter list title",
|
title: "Enter list title",
|
||||||
id: NEW_LIST_ID
|
id: NEW_LIST_ID
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/* wait a moment, then scroll list to the bottom */
|
||||||
|
setTimeout(function() {
|
||||||
|
document.getElementById("list-container").scrollTo({
|
||||||
|
top: 100000,
|
||||||
|
behavior: "smooth"
|
||||||
|
});
|
||||||
|
/* select text in new item's title field */
|
||||||
|
const titleInput = document.querySelector(`#list-${NEW_LIST_ID} .item-title`);
|
||||||
|
titleInput.setSelectionRange(0, 1000);
|
||||||
|
titleInput.focus();
|
||||||
|
}, 100);
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -198,7 +198,7 @@ export default {
|
|||||||
behavior: "smooth"
|
behavior: "smooth"
|
||||||
});
|
});
|
||||||
/* select text in new item's title field */
|
/* select text in new item's title field */
|
||||||
const titleInput = document.querySelector(`#task-${newItemId} .item-title`);
|
const titleInput = document.querySelector(`#task-${NEW_TASK_ID} .item-title`);
|
||||||
titleInput.setSelectionRange(0, 1000);
|
titleInput.setSelectionRange(0, 1000);
|
||||||
titleInput.focus();
|
titleInput.focus();
|
||||||
}, 100);
|
}, 100);
|
||||||
@ -322,4 +322,4 @@ h1 {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -40,7 +40,7 @@ class GqlError extends Error {
|
|||||||
} else if (error instanceof String) {
|
} else if (error instanceof String) {
|
||||||
errorMessages.push(error);
|
errorMessages.push(error);
|
||||||
|
|
||||||
} else if ('errors' in error) {
|
} else if (typeof error === 'object' && 'errors' in error) {
|
||||||
/** assume this is a GraphQL server response (JSON) of the following form:
|
/** assume this is a GraphQL server response (JSON) of the following form:
|
||||||
* {
|
* {
|
||||||
* "errors": [
|
* "errors": [
|
||||||
|
Loading…
Reference in New Issue
Block a user