Skip to content

Instantly share code, notes, and snippets.

View SaraVieira's full-sized avatar
🤷‍♀️
open sourcy and shit

Sara Vieira SaraVieira

🤷‍♀️
open sourcy and shit
View GitHub Profile

Hello 👋

This is going to be a very special ReactJSGirls event that will happen together with BerlinJS.

This event will focus all in wellness, burnout prevention and self care.

We will have some lightning talks and a session of desk yoga so that we all do our share of stretches everyday even if we are sitting on a desk every day.BerlinJS

Our instructor will be:

@SaraVieira
SaraVieira / README.md
Last active November 19, 2018 21:04 — forked from elijahmanor/README.md
Export @code Extensions to a Markdown List

You can run either of the following snippets in your terminal to generate a markdown list of your VS Code extensions.

code-insiders --list-extensions | awk '{ print "* [" $1 "](https://marketplace.visualstudio.com/items\?itemName\=" $1 ")" }'

npx https://gist.github.com/elijahmanor/7f9762a4c2296839ad33e33513e88043

NOTE: You can append | pbcopy to either of the above commands to pipe the output to your Mac's copy/paste buffer.

{
getUsers(people: 3) {
name {
first
last
},
location {
city
}
}
getUsers: async (_, { people }, { dataSources }) =>
dataSources.RandomUser.getUsers(people)
async getUsers(people = 10) {
const user = await this.get(`/?results=${people}`);
return user.results;
}
{
getUser {
name {
first
last
}
}
}
const resolvers = {
Query: {
getUser: async (_, __, { dataSources }) => dataSources.RandomUser.getUser()
}
};
const server = new ApolloServer({
typeDefs,
resolvers,
dataSources: () => ({
RandomUser: new RandomUser()
})
});
const { RESTDataSource } = require("apollo-datasource-rest");
class RandomUser extends RESTDataSource {
constructor() {
super();
this.baseURL = "https://randomuser.me/api";
}
async getUser() {
const user = await this.get("/");
async getThing(id) {
return this.get(`things/${id}`);
}