This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:convert'; | |
import 'package:meta/meta.dart'; | |
import 'package:http/http.dart' as http; | |
class HttpClient extends http.BaseClient { | |
factory HttpClient(String token) { | |
final http.Client client = http.Client(); | |
return HttpClient._createInstance(client, token); | |
} | |
HttpClient._createInstance(this._inner, this.token); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const bcrypt = require('bcryptjs') | |
const jwt = require('jsonwebtoken') | |
const authMutations = { | |
async signup (parent, args, ctx, info) { | |
const { email } = args | |
const userExists = await ctx.db.exists.User({ email }) | |
if (userExists) { | |
throw new Error('User already exists') | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<g :transform="node.position"> | |
<circle fill="white" stroke="black" r="5" cx="0" cy="0"/> | |
<text | |
transform="translate(-10,-10)" | |
:textAnchor="node.textAnchor"> | |
{{ node.name }} | |
</text> | |
</g> | |
</template> |