Repository URL to install this package:
|
Version:
1.2.20 ▾
|
"use strict";
var _graphene = require("graphene");
class User extends _graphene.ObjectType {
constructor(...args) {
super(...args);
this.name = new _graphene.String();
}
}
class Query extends _graphene.ObjectType {
constructor(...args) {
super(...args);
this.getUser = new User({
id: new _graphene.String()
});
}
getUserResolver({
id
}) {
return {
name: "Syrus"
};
}
}
const schema = new _graphene.Schema({
query: Query
});