This is a GraphQL client for Python 3.6+.Plays nicely with graphene
, graphql-core
, graphql-js
and any other GraphQL implementation compatible with the spec.
GQL architecture is inspired by React-Relay
and Apollo-Client
.
WARNING: Please note that the following documentation describes the current version which is currently only available as a pre-releaseThe documentation for the 2.x version compatible with python<3.6 is available in the 2.x branch
The complete documentation for GQL can be found atgql.readthedocs.io.
The main features of GQL are:
WARNING: Please note that the following documentation describes the current version which is currently only available as a pre-release and needs to be installed with
$ pip install --pre gql[all]
NOTE: See also the documentation to install GQL with less extra dependencies
from gql import gql, Client
from gql.transport.aiohttp import AIOHTTPTransport
# Select your transport with a defined url endpoint
transport = AIOHTTPTransport(url="https://countries.trevorblades.com/")
# Create a GraphQL client using the defined transport
client = Client(transport=transport, fetch_schema_from_transport=True)
# Provide a GraphQL query
query = gql(
"""
query getContinents {
continents {
code
name
}
}
"""
)
# Execute the query on the transport
result = client.execute(query)
print(result)
WARNING: Please note that this basic example won't work if you have an asyncio event loop running. In somepython environments (as with Jupyter which uses IPython) an asyncio event loop is created for you. In that case youshould use instead the async usage example.
See CONTRIBUTING.md
http://wapbaike.baidu.com/view/8965981.htm?uid=D0604A052A48B0F5013EC29A99F19073&bd_page_type=1&st=3&step=2&net=0&ldr=0 概述 GQL 是一种类似于 SQL 的查询语言,适用于查询 App Engine 数据库。有关 GQL 语法和功能的完整讨论,请参阅 GQL 参考。 GqlQue
问题说明 在Spring整合Mybatis时,遇到此问题。 Caused by: java.lang.NoSuchMethodException: com.gql.pojo.User.<init>() at java.lang.Class.getConstructor0(Class.java:2892) at java.lang.Class.getDeclaredConstructor(Cla