Skip to content

Fix Example Apps #218

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 23, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions examples/flask_sqlalchemy/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
graphene[sqlalchemy]
SQLAlchemy==1.0.11
Flask==0.12.4
Flask-GraphQL==1.3.0
-e ../../
Flask-GraphQL
6 changes: 3 additions & 3 deletions examples/nameko_sqlalchemy/app.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from database import db_session, init_db
from schema import schema

from graphql_server import (HttpQueryError, default_format_error,
encode_execution_results, json_encode,
load_json_body, run_http_query)

from .database import db_session, init_db
from .schema import schema


class App():
def __init__(self):
Expand Down
3 changes: 1 addition & 2 deletions examples/nameko_sqlalchemy/models.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from database import Base
from sqlalchemy import Column, DateTime, ForeignKey, Integer, String, func
from sqlalchemy.orm import backref, relationship

from .database import Base


class Department(Base):
__tablename__ = 'department'
Expand Down
5 changes: 2 additions & 3 deletions examples/nameko_sqlalchemy/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
graphene[sqlalchemy]
SQLAlchemy==1.0.11
nameko
-e ../../
graphql-server-core
nameko
8 changes: 4 additions & 4 deletions examples/nameko_sqlalchemy/schema.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from models import Department as DepartmentModel
from models import Employee as EmployeeModel
from models import Role as RoleModel

import graphene
from graphene import relay
from graphene_sqlalchemy import SQLAlchemyConnectionField, SQLAlchemyObjectType

from .models import Department as DepartmentModel
from .models import Employee as EmployeeModel
from .models import Role as RoleModel


class Department(SQLAlchemyObjectType):

Expand Down
3 changes: 1 addition & 2 deletions examples/nameko_sqlalchemy/service.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!/usr/bin/env python
from app import App
from nameko.web.handlers import http

from .app import App


class DepartmentService:
name = 'department'
Expand Down
5 changes: 3 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ exclude = setup.py,docs/*,examples/*,tests
max-line-length = 120

[isort]
no_lines_before=FIRSTPARTY
known_graphene=graphene,graphql_relay,flask_graphql,graphql_server,sphinx_graphene_theme
known_first_party=graphene_sqlalchemy
known_third_party=database,flask,models,nameko,promise,py,pytest,schema,setuptools,singledispatch,six,sqlalchemy,sqlalchemy_utils
known_third_party=app,database,flask,models,nameko,promise,py,pytest,schema,setuptools,singledispatch,six,sqlalchemy,sqlalchemy_utils
sections=FUTURE,STDLIB,THIRDPARTY,GRAPHENE,FIRSTPARTY,LOCALFOLDER
no_lines_before=FIRSTPARTY
skip_glob=examples/nameko_sqlalchemy

[bdist_wheel]
universal=1