Fixed typos in docs, string literals, comments, test name
This commit is contained in:
Min ho Kim 2019-09-26 09:57:53 +10:00 committed by Jessamyn Hodge
parent 8e7d76bbce
commit e90aa1b712
12 changed files with 15 additions and 15 deletions

View File

@ -24,7 +24,7 @@ What is Graphene?
Graphene is a library that provides tools to implement a GraphQL API in Python using a *code-first* approach.
Compare Graphene's *code-first* approach to building a GraphQL API with *schema-first* approaches like `Apollo Server`_ (JavaScript) or Ariadne_ (Python). Instead of writing GraphQL **Schema Definition Langauge (SDL)**, we write Python code to describe the data provided by your server.
Compare Graphene's *code-first* approach to building a GraphQL API with *schema-first* approaches like `Apollo Server`_ (JavaScript) or Ariadne_ (Python). Instead of writing GraphQL **Schema Definition Language (SDL)**, we write Python code to describe the data provided by your server.
.. _Apollo Server: https://www.apollographql.com/docs/apollo-server/

View File

@ -195,7 +195,7 @@ The two resolvers in this example are effectively the same.
# ...
If you prefer your code to be more explict, feel free to use ``@staticmethod`` decorators. Otherwise, your code may be cleaner without them!
If you prefer your code to be more explicit, feel free to use ``@staticmethod`` decorators. Otherwise, your code may be cleaner without them!
.. _DefaultResolver:
@ -251,7 +251,7 @@ GraphQL Argument defaults
If you define an argument for a field that is not required (and in a query
execution it is not provided as an argument) it will not be passed to the
resolver function at all. This is so that the developer can differenciate
resolver function at all. This is so that the developer can differentiate
between a ``undefined`` value for an argument and an explicit ``null`` value.
For example, given this schema:

View File

@ -14,7 +14,7 @@ def setup():
# Yeah, technically it's Corellian. But it flew in the service of the rebels,
# so for the purposes of this demo it's a rebel ship.
falcon = Ship(id="4", name="Millenium Falcon")
falcon = Ship(id="4", name="Millennium Falcon")
homeOne = Ship(id="5", name="Home One")

View File

@ -17,7 +17,7 @@ snapshots["test_mutations 1"] = {
{"node": {"id": "U2hpcDox", "name": "X-Wing"}},
{"node": {"id": "U2hpcDoy", "name": "Y-Wing"}},
{"node": {"id": "U2hpcDoz", "name": "A-Wing"}},
{"node": {"id": "U2hpcDo0", "name": "Millenium Falcon"}},
{"node": {"id": "U2hpcDo0", "name": "Millennium Falcon"}},
{"node": {"id": "U2hpcDo1", "name": "Home One"}},
{"node": {"id": "U2hpcDo5", "name": "Peter"}},
]

View File

@ -30,7 +30,7 @@ class Argument(MountedType):
type (class for a graphene.UnmountedType): must be a class (not an instance) of an
unmounted graphene type (ex. scalar or object) which is used for the type of this
argument in the GraphQL schema.
required (bool): indicates this argument as not null in the graphql scehma. Same behavior
required (bool): indicates this argument as not null in the graphql schema. Same behavior
as graphene.NonNull. Default False.
name (str): the name of the GraphQL argument. Defaults to parameter name.
description (str): the description of the GraphQL argument in the schema.

View File

@ -50,7 +50,7 @@ class Field(MountedType):
object. Alternative to resolver (cannot set both source and resolver).
deprecation_reason (optional, str): Setting this value indicates that the field is
depreciated and may provide instruction or reason on how for clients to proceed.
required (optional, bool): indicates this field as not null in the graphql scehma. Same behavior as
required (optional, bool): indicates this field as not null in the graphql schema. Same behavior as
graphene.NonNull. Default False.
name (optional, str): the name of the GraphQL field (must be unique in a type). Defaults to attribute
name.

View File

@ -38,7 +38,7 @@ class InputField(MountedType):
deprecation_reason (optional, str): Setting this value indicates that the field is
depreciated and may provide instruction or reason on how for clients to proceed.
description (optional, str): Description of the GraphQL field in the schema.
required (optional, bool): Indicates this input field as not null in the graphql scehma.
required (optional, bool): Indicates this input field as not null in the graphql schema.
Raises a validation error if argument not provided. Same behavior as graphene.NonNull.
Default False.
**extra_args (optional, Dict): Not used.

View File

@ -22,7 +22,7 @@ class ObjectType(BaseType):
have a name, but most importantly describe their fields.
The name of the type defined by an _ObjectType_ defaults to the class name. The type
description defaults to the class docstring. This can be overriden by adding attributes
description defaults to the class docstring. This can be overridden by adding attributes
to a Meta inner class.
The class attributes of an _ObjectType_ are mounted as instances of ``graphene.Field``.
@ -66,8 +66,8 @@ class ObjectType(BaseType):
docstring.
interfaces (Iterable[graphene.Interface]): GraphQL interfaces to extend with this object.
all fields from interface will be included in this object's schema.
possible_types (Iterable[class]): Used to test parent value object via isintance to see if
this type can be used to resolve an ambigous type (interface, union).
possible_types (Iterable[class]): Used to test parent value object via isinstance to see if
this type can be used to resolve an ambiguous type (interface, union).
default_resolver (any Callable resolver): Override the default resolver for this
type. Defaults to graphene default resolver which returns an attribute or dictionary
key with the same name as the field.

View File

@ -481,7 +481,7 @@ class Schema:
as string or parsed AST form from `graphql-core`.
root_value (Any, optional): Value to use as the parent value object when resolving
root types.
context_value (Any, optional): Value to be made avaiable to all resolvers via
context_value (Any, optional): Value to be made available to all resolvers via
`info.context`. Can be used to share authorization, dataloaders or other
information needed to resolve an operation.
variable_values (dict, optional): If variables are used in the request string, they can

View File

@ -172,7 +172,7 @@ def test_enum_can_be_compared():
assert RGB.BLUE == 3
def test_enum_can_be_initialzied():
def test_enum_can_be_initialized():
class RGB(Enum):
RED = 1
GREEN = 2

View File

@ -23,7 +23,7 @@ class Union(UnmountedType, BaseType):
The schema in this example can take a search text and return any of the GraphQL object types
indicated: Human, Droid or Startship.
Ambigous return types can be resolved on each ObjectType through ``Meta.possible_types``
Ambiguous return types can be resolved on each ObjectType through ``Meta.possible_types``
attribute or ``is_type_of`` method. Or by implementing ``resolve_type`` class method on the
Union.

View File

@ -8,7 +8,7 @@ from .scalars import Scalar
class UUID(Scalar):
"""
Leverages the internal Python implmeentation of UUID (uuid.UUID) to provide native UUID objects
Leverages the internal Python implementation of UUID (uuid.UUID) to provide native UUID objects
in fields, resolvers and input.
"""