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