This file contains 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
{ code: | |
'4/GwGg5miSAcd1wKy9Ye81SLrk6P5fqo46m_W9Vwh2KFBQgHhK-jA4cVsZn2XG57t7-Bdq4XHJ-uKPQvJdJjnkVIM' } | |
{ values: | |
{ code: | |
'4/GwGg5miSAcd1wKy9Ye81SLrk6P5fqo46m_W9Vwh2KFBQgHhK-jA4cVsZn2XG57t7-Bdq4XHJ-uKPQvJdJjnkVIM', | |
client_id: | |
'689324920305-m6h4n6blvhaalrgc89dese8s5tca9kol.apps.googleusercontent.com', | |
client_secret: '8OC4sIVWQotJuenxrfmFQL2i', | |
redirect_uri: 'https://conduitventures.consulting/auth/google', | |
grant_type: 'authorization_code', |
This file contains 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
scalar DateTime @class(name: "Date") | |
enum TaskStatus { | |
Created | |
InProgress | |
Done | |
} | |
input InputCreateTaskEntity { | |
ownerEmail: String! @IsEmail |
This file contains 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
type User { | |
name: String! | |
@required | |
@string(min: 5) | |
} |
This file contains 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
enum UserTypes { | |
SuperUser | |
Administrator | |
Customer | |
} | |
enum Gender { | |
""" | |
Men | |
""" |
This file contains 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
[@gql.name "AuthRoles"] | |
[@gql.comment "Authentication roles for all users"] | |
[@gql.type] | |
type authRoles = [ | `SuperUser | `Administrator | `User]; | |
[@gql.type] | |
module User = { | |
type t = { | |
id: string, | |
email: string, |
This file contains 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 handleChange = name => { | |
return e => { | |
this.setState({ | |
[name]: e.target.value, | |
}); | |
}; | |
}; | |
class Foo extends Component { |
This file contains 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
it('gets a route but is not authed', (done) => { | |
chai.request(server) | |
.get('/') | |
.end((err, res) => { | |
assert(res.request.url.endsWith('/login'), | |
'should be redirected to /login'); | |
done(); | |
}); | |
}); |
This file contains 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
type Result<E, V> = [null, V] | [E, null]; | |
const emailList = ['[email protected]']; | |
function searchForEmail(email: string): Result<Error, bool> { | |
if (email.indexOf('@') === -1) { | |
return [new Error('this is not an email'), null]; | |
} | |
// here we would do an actual search for the email ... |
This file contains 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
class EventWaiter { | |
_emitter: EventEmitter; | |
_event: string; | |
_promise: Promise<mixed>; | |
_accept: Function; | |
_onEvent = (value) => { | |
this._accept(value); | |
this._emitter.removeEventListener(this._event, this._onEvent); |
This file contains 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
type BlobUploadInput = { | |
stuff: string; | |
}; | |
class BlobUpload { | |
stuff: string; | |
constructor(obj: BlobUploadInput) { | |
Object.assign(this, obj); | |
} |
NewerOlder