-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #168 from evo-company/fix-docs
fix docs all over the place
- Loading branch information
Showing
17 changed files
with
586 additions
and
166 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ Changelog | |
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
changes_08 | ||
changes_07 | ||
changes_06 | ||
changes_05 | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from hiku.types import String | ||
from hiku.graph import Graph, Root, Field | ||
from hike.schema import Schema | ||
from hiku.endpoint.graphql import AsyncGraphQLEndpoint | ||
from hiku.executors.asyncio import AsyncIOExecutor | ||
|
||
async def say_hello(fields): | ||
return ['Hello World!' for _ in fields] | ||
|
||
QUERY_GRAPH = Graph([ | ||
Root([Field('hello', String, say_hello)]), | ||
]) | ||
|
||
schema = Schema(AsyncIOExecutor(), QUERY_GRAPH) | ||
|
||
endpoint = AsyncGraphQLEndpoint(schema) | ||
|
||
assert await endpoint.dispatch({ | ||
'query': "{ hello }", | ||
'variables': None, | ||
'operationName': "GetHello", | ||
}) == { | ||
'data': { | ||
'hello': 'Hello World!', | ||
}, | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
from hiku.graph import Graph, Root, Field | ||
from hiku.types import String | ||
from hiku.schema import Schema | ||
from hiku.executors.sync import SyncExecutor | ||
from hiku.endpoint.graphql import GraphQLEndpoint | ||
|
||
def say_hello(fields): | ||
return ['Hello World!' for _ in fields] | ||
|
||
QUERY_GRAPH = Graph([ | ||
Root([Field('hello', String, say_hello)]), | ||
]) | ||
|
||
schema = Schema(SyncExecutor(), QUERY_GRAPH) | ||
|
||
endpoint = GraphQLEndpoint(schema) | ||
|
||
assert endpoint.dispatch({ | ||
'query': "{ hello }", | ||
'variables': None, | ||
'operationName': "GetHello", | ||
}) == { | ||
'data': { | ||
'hello': 'Hello World!', | ||
}, | ||
} |
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
Oops, something went wrong.