Inputs
GraphQL Input Type Definitions
This section documents the input types used in the pyck GraphQL API. Input types are used as arguments for mutations and query parameters, providing structured data for creating, updating, and filtering entities.
Overview
Input types in pyck follow consistent naming patterns:
Create Inputs:
Create<Type>Input- Used for creating new entitiesUpdate Inputs:
Update<Type>Input- Used for updating existing entitiesWhere Inputs:
<Type>WhereInput- Used for filtering entities in queriesOrderBy Inputs:
<Type>OrderByInput- Used for sorting entities in queries
Available Input Types
WhereInput Types
WhereInput types provide comprehensive filtering capabilities for queries. They include logical operators, field comparisons, relationship filtering, and data field operations.
WhereInput Types Overview - Comprehensive guide to filtering with WhereInput types
InventoryItemWhereInput - Detailed documentation for inventory item filtering
For a complete list of all available WhereInput types, see the WhereInput Types Overview.
Workflow Input Types
Input types for workflow-related operations:
GetAssigneeInput - Query the current assignee of a workflow
SetAssigneeInput - Set or update the assignee of a workflow
Create Input Types
Create input types define the required and optional fields when creating new entities. They typically include:
Required fields that must be provided
Optional fields with default values
Relationship references (IDs of related entities)
Data field for custom JSON attributes
Update Input Types
Update input types allow partial updates to existing entities. They typically include:
Entity ID (required)
Optional fields that can be updated
Relationship updates
Data field modifications
OrderBy Input Types
OrderBy input types provide sorting capabilities for query results. They typically include:
Field-based sorting (ASC/DESC)
Multiple field sorting with priority
Relationship-based sorting
Common Patterns
Field Predicates
WhereInput types use consistent field predicate patterns:
Logical Operators
All WhereInput types support logical operations:
Relationship Filtering
Entities with relationships provide filtering on related entities:
Data Field Operations
For entities with JSON data fields, pyck provides powerful query operations:
For detailed information on JSON field queries, including path syntax and advanced examples, see the Advanced JSON Field Queries guide.
Usage Examples
Basic Filtering
Complex Filtering
Creating Entities
Best Practices
Use specific filters: Filter at the database level using WhereInput rather than loading all data and filtering client-side.
Leverage logical operators: Combine
and,or, andnotfor complex filtering logic.Case-insensitive search: Use
*EqualFoldand*ContainsFoldfor user-friendly search functionality.Relationship filtering: Use
has...Withpredicates to filter based on related entity properties.Date ranges: Combine
*GTEand*LTfor effective date range queries.Null handling: Use
*IsNiland*NotNilpredicates to handle optional fields properly.
Related Documentation
GraphQL Queries - How to use input types in queries
GraphQL Mutations - How to use input types in mutations
GraphQL Types - Entity types that these inputs relate to
Error Handling - Common errors when using input types
Last updated
Was this helpful?
