Add Graphiql redirect, css, etc.
This commit is contained in:
parent
9cfb56f123
commit
0148812c60
4 changed files with 17 additions and 4 deletions
|
@ -31,7 +31,7 @@ class Todo extends _Todo {
|
|||
bool isComplete,
|
||||
DateTime createdAt,
|
||||
DateTime updatedAt}) {
|
||||
return new Todo(
|
||||
return Todo(
|
||||
id: id ?? this.id,
|
||||
text: text ?? this.text,
|
||||
isComplete: isComplete ?? this.isComplete,
|
||||
|
@ -67,7 +67,7 @@ class Todo extends _Todo {
|
|||
// SerializerGenerator
|
||||
// **************************************************************************
|
||||
|
||||
const TodoSerializer todoSerializer = const TodoSerializer();
|
||||
const TodoSerializer todoSerializer = TodoSerializer();
|
||||
|
||||
class TodoEncoder extends Converter<Todo, Map> {
|
||||
const TodoEncoder();
|
||||
|
@ -91,7 +91,7 @@ class TodoSerializer extends Codec<Todo, Map> {
|
|||
@override
|
||||
get decoder => const TodoDecoder();
|
||||
static Todo fromMap(Map map) {
|
||||
return new Todo(
|
||||
return Todo(
|
||||
id: map['id'] as String,
|
||||
text: map['text'] as String,
|
||||
isComplete: map['is_complete'] as bool,
|
||||
|
|
|
@ -12,7 +12,7 @@ GraphQLSchema createSchema(Angel app) {
|
|||
|
||||
var mutationType = objectType(
|
||||
'TodoMutation',
|
||||
fields: todoQueryFields(app),
|
||||
fields: todoMutationFields(app),
|
||||
);
|
||||
|
||||
return graphQLSchema(
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
<extend src="layout.jael">
|
||||
<block name="content">
|
||||
<div class="title">Angel</div>
|
||||
<p>
|
||||
<a href="/graphiql">Click here</a> to access GraphiQL.
|
||||
</p>
|
||||
</block>
|
||||
</extend>
|
|
@ -11,6 +11,16 @@ body {
|
|||
font-family: 'Lato', sans-serif;
|
||||
}
|
||||
|
||||
a {
|
||||
color: rgb(8, 114, 175) !important;
|
||||
font-weight: 900;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 1.3em;
|
||||
}
|
||||
|
||||
.container {
|
||||
text-align: center;
|
||||
display: table-cell;
|
||||
|
|
Loading…
Reference in a new issue