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
server { | |
listen 80; | |
location / { | |
proxy_pass http://localhost:3000; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection 'upgrade'; | |
proxy_set_header Host $host; | |
proxy_cache_bypass $http_upgrade; | |
} |
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
<form | |
class="form-inline" | |
action="VALUE FROM MAILCHIP CODE" | |
method="post" | |
id="mc-embedded-subscribe-form" | |
name="mc-embedded-subscribe-form" | |
target="_blank" | |
> | |
<div class="container"> | |
<div class="row sm-100 justify-content-md-center"> |
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
<!-- Begin Mailchimp Signup Form --> | |
<div id="mc_embed_signup"> | |
<form action="https://app.us19.list-manage.com/subscribe/post?u=d92c9422ebf632afebbfa4d5c&id=1eaf057efe" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate> | |
<div id="mc_embed_signup_scroll"> | |
<div class="mc-field-group"> | |
<label for="mce-EMAIL">Email Address </label> | |
<input type="email" value="" name="EMAIL" class="required email" id="mce-EMAIL"> | |
</div> | |
<div id="mce-responses" class="clear"> |
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 resolve_user_configuration(*args, **kwargs): | |
configuration = get_user_configuration(user_id) | |
result = { | |
'enabled' : configuration.enabled, | |
'value' : configuration.value, | |
'id': configuration.id | |
} | |
return result | |
class User(SQLAlchemyObjectType): |
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 graphene | |
class Configuration(graphene.ObjectType): | |
#ID! definition to be ommitted, generated by node interface | |
enabled = graphene.Boolean() | |
value = graphene.Int() | |
class Meta: | |
interfaces = (graphene.relay.Node, ) |
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 graphene_sqlalchemy import SQLAlchemyObjectType | |
from models import User as UserModels | |
class User(SQLAlchemyObjectType): | |
class Meta: | |
model = UserModel |
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 Query(graphene.ObjectType): | |
node = relay.Node.Field() | |
user = graphene.Field(User, | |
id=graphene.String(required=True)) | |
def resolve_user( | |
args, | |
info, | |
id, **kwargs): |
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 Query(graphene.ObjectType): | |
node = relay.Node.Field() | |
user = graphene.Field(User, | |
id=graphene.String(required=True)) | |
def resolve_user( | |
args, | |
info, | |
id, **kwargs): |
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
{ | |
"data": { | |
"User": { | |
"id": "GWESDssuYSsDFASDF234SDF0aW92aSD=", | |
"Configuration": { | |
"id": "QXVkaWVuY2VDb25maWd1cmF0aW9uOjQ=", | |
"enabled": false, | |
"value": 100 | |
} | |
} |
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 Configuration(graphene.ObjectType): | |
#ID! definition to be ommitted, generated by node interface | |
enabled = graphene.Boolean() | |
value = graphene.Int() | |
class Meta: | |
interfaces = (relay.Node, ) | |
def query_Configuration(user_id): | |
configuration = get_user_configuration(user_id) | |
result = { |
NewerOlder