mirror of
				https://github.com/graphql-python/graphene.git
				synced 2025-10-30 23:47:55 +03:00 
			
		
		
		
	Tweak the documentation to match behavior in the playground.
This commit is contained in:
		
							parent
							
								
									88ccaec8fa
								
							
						
					
					
						commit
						77e4ead0d7
					
				|  | @ -1,7 +1,7 @@ | ||||||
| Scalars | Scalars | ||||||
| ======= | ======= | ||||||
| 
 | 
 | ||||||
| Graphene define the following base Scalar Types: | Graphene defines the following base Scalar Types: | ||||||
| 
 | 
 | ||||||
| - ``graphene.String`` | - ``graphene.String`` | ||||||
| - ``graphene.Int`` | - ``graphene.Int`` | ||||||
|  | @ -47,8 +47,8 @@ The following is an example for creating a DateTime scalar: | ||||||
| Mounting Scalars | Mounting Scalars | ||||||
| ---------------- | ---------------- | ||||||
| 
 | 
 | ||||||
| This scalars if are mounted in a ``ObjectType``, ``Interface`` or | These scalars, if are mounted in a ``ObjectType``, ``Interface`` or | ||||||
| ``Mutation``, would act as ``Field``\ s. | ``Mutation``, act as ``Field``\ s. Note: when using the ``Field`` constructor directly, pass the type and not an instance. | ||||||
| 
 | 
 | ||||||
| .. code:: python | .. code:: python | ||||||
| 
 | 
 | ||||||
|  | @ -57,14 +57,14 @@ This scalars if are mounted in a ``ObjectType``, ``Interface`` or | ||||||
| 
 | 
 | ||||||
|     # Is equivalent to: |     # Is equivalent to: | ||||||
|     class Person(graphene.ObjectType): |     class Person(graphene.ObjectType): | ||||||
|         name = graphene.Field(graphene.String()) |         name = graphene.Field(graphene.String) | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| If the types are mounted in a ``Field``, would act as ``Argument``\ s. | If the types are mounted in a ``Field``, would act as ``Argument``\ s. | ||||||
| 
 | 
 | ||||||
| .. code:: python | .. code:: python | ||||||
| 
 | 
 | ||||||
|     graphene.Field(graphene.String(), to=graphene.String()) |     graphene.Field(graphene.String, to=graphene.String()) | ||||||
| 
 | 
 | ||||||
|     # Is equivalent to: |     # Is equivalent to: | ||||||
|     graphene.Field(graphene.String(), to=graphene.Argument(graphene.String())) |     graphene.Field(graphene.String, to=graphene.Argument(graphene.String())) | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user