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
// https://eslint.org/docs/user-guide/configuring | |
module.exports = { | |
root: true, | |
parserOptions: { | |
parser: 'babel-eslint', | |
}, | |
env: { | |
browser: true, | |
es6: true, |
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
// https://eslint.org/docs/user-guide/configuring | |
module.exports = { | |
root: true, | |
parserOptions: { | |
parser: 'babel-eslint' | |
}, | |
env: { | |
browser: true, | |
es6: true, |
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
{ "signal": 11 | |
, "executable": "/usr/bin/gnome-shell-extension-prefs" | |
, "stacktrace": | |
[ { "crash_thread": true | |
, "frames": | |
[ { "address": 140095114869728 | |
, "build_id": "8aaf7d0cb428b58d6e02a03bd903d6cd1e197666" | |
, "build_id_offset": 1092576 | |
, "file_name": "/lib64/libgio-2.0.so.0" | |
} |
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 JSON_SERVER = require('json-server'); | |
const SERVER = JSON_SERVER.create(); | |
const MIDDLEWARES = JSON_SERVER.defaults(); | |
// YOUR SEED FILE | |
const seed = require('./db.json'); | |
// if your seedfile exports a function, you should run it to get the generated json object | |
// in this case inside db.json we can have dynamically generated entries |
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
class PopularityDistanceQuerySetMixin(object): | |
"""Mixin when you need to add popularity, distance, | |
nearby calls to queryset, can be used as it for Coupon | |
and Merchant models | |
""" | |
def with_popularity(self): | |
"""Adds counted field popularity which is the value | |
of redeemed coupon | |
""" |
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
Test in : http://graphql.org/swapi-graphql | |
# --------------------------------------------- | |
# Fragment based query | |
# --------------------------------------------- | |
query details($episode: ID, $withStarship: Boolean = false) { | |
film(id: $episode) { | |
id | |
title |
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
Test in : http://graphql.org/swapi-graphql | |
# --------------------------------------------- | |
# Basic query | |
# --------------------------------------------- | |
query details ($episode: ID $withStarship: Boolean = false){ | |
film (id: $episode) { | |
id | |
title |
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
Test in : http://graphql.org/swapi-graphql | |
# --------------------------------------------- | |
# Basic query | |
# --------------------------------------------- | |
query all { | |
allFilms { | |
films { |
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
# Schema Query | |
{ | |
__schema { | |
queryType { | |
name | |
kind | |
fields { | |
name | |
description | |
isDeprecated |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
NewerOlder