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
@permission_denied { | |
:error, | |
%{ | |
message: gettext("Permission denied"), | |
code: :permission_denied | |
} | |
} |
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
def add(field_name, type, **options): | |
pass | |
def create_index(field_name): | |
pass | |
def schema(table_name, *actions): | |
return DatabaseTable(table_name) |
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
from typing import Any, Dict | |
from graphene_django.views import GraphQLView | |
from graphql.error import GraphQLError | |
from graph.format_error import format_error | |
class MyGraphQLView(GraphQLView): | |
@staticmethod |
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
from typing import Dict, Any | |
from graphql import GraphQLError | |
def format_error(error: GraphQLError) -> Dict[str, Any]: | |
"""Extract field from ``error`` and return formatted error | |
:param error: GraphQLError | |
:return: mapping of fieldName -> error message | |
""" |
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
import Vue from 'vue' | |
import VueApollo from 'vue-apollo' | |
import { ApolloClient } from 'apollo-client' | |
import { HttpLink } from 'apollo-link-http' | |
import { InMemoryCache } from 'apollo-cache-inmemory' | |
import { GRAPHQL_ENDPOINT } from './config' | |
const httpLink = new HttpLink({ | |
// You should use an absolute URL here | |
uri: GRAPHQL_ENDPOINT |
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
module.exports = { | |
chainWebpack: config => { | |
config.module | |
.rule('graphql') | |
.test(/\.gql$/) | |
.use('graphql-tag/loader') | |
.loader('graphql-tag/loader') | |
.end() | |
} | |
} |
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 path = require('path') | |
const { | |
hasYarn, | |
IpcMessenger, | |
} = require('@vue/cli-shared-utils') | |
const chalk = require('chalk') | |
const { defaultValue, nullable } = require('./utils') | |
const DEFAULT_SERVER_FOLDER = './apollo-server' | |
const COMMAND_OPTIONS = { |
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
function posix-source | |
for i in (cat $argv) | |
set arr (echo $i |tr = \n) | |
set -gx $arr[1] $arr[2] | |
end | |
end |
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
LOGGING = { | |
"version": 1, | |
"disable_existing_loggers": False, | |
"root": {"level": "DEBUG", "handlers": ["console"]}, | |
"formatters": { | |
"verbose": { | |
"format": "%(levelname)s %(asctime)s %(module)s " | |
"%(process)d %(thread)d %(message)s" | |
} | |
}, |
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
<style lang="sass" scoped> | |
.upload | |
&__documents | |
border: 1px dashed #eee | |
border-radius: 0.2em | |
margin: 0.5em | |
padding: 1em 0 0.5em 0.5em | |
transition: all 0.1s ease-in | |
&:hover |