diff --git a/bbconf/bb_todo-resolver.toml b/bbconf/bb_todo-resolver.toml index 5f2de5d..f5ca53c 100644 --- a/bbconf/bb_todo-resolver.toml +++ b/bbconf/bb_todo-resolver.toml @@ -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] operation_name = "createList" @@ -36,6 +18,24 @@ value = "'$title'" column = "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] operation_name = "updateTask" @@ -57,7 +57,7 @@ value = "'$description'" [[resolvers.updateTask.resolver.command.modify_values]] column = "completed" -value = "$completed" +value = "'$completed'" [[resolvers.updateTask.resolver.command.modify_values]] column = "list_id" @@ -69,6 +69,24 @@ column = "id" condition_str = "= '$id'" 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] operation_name = "createTask" @@ -91,7 +109,7 @@ value = "'$description'" [[resolvers.createTask.resolver.command.modify_values]] column = "completed" -value = "$completed" +value = "'$completed'" [[resolvers.createTask.resolver.command.modify_values]] column = "list_id" @@ -101,6 +119,26 @@ value = "'$list.$id'" column = "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] operation_name = "updateList" @@ -122,44 +160,6 @@ column = "id" condition_str = "= '$id'" 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] operation_name = "getUser" diff --git a/bbconf/compile.sh b/bbconf/compile.sh new file mode 100755 index 0000000..06957e0 --- /dev/null +++ b/bbconf/compile.sh @@ -0,0 +1,5 @@ +#!/bin/sh +# +# Compile the todo schema. +# +cargo run --manifest-path=../../../bbc/Cargo.toml -- --prefix=bb_todo -f todo_schema.graphql diff --git a/src/components/Lists.vue b/src/components/Lists.vue index d9c3f76..e1bf921 100644 --- a/src/components/Lists.vue +++ b/src/components/Lists.vue @@ -20,7 +20,7 @@