Add Graphiql redirect, css, etc.

This commit is contained in:
Tobe O 2019-04-29 13:20:47 -04:00
parent 9cfb56f123
commit 0148812c60
4 changed files with 17 additions and 4 deletions

View file

@ -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,

View file

@ -12,7 +12,7 @@ GraphQLSchema createSchema(Angel app) {
var mutationType = objectType(
'TodoMutation',
fields: todoQueryFields(app),
fields: todoMutationFields(app),
);
return graphQLSchema(

View file

@ -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>

View file

@ -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;