Package io.jmix.graphql.datafetcher
Class EnvironmentUtils
java.lang.Object
io.jmix.graphql.datafetcher.EnvironmentUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected MetaClassfindMetaClassByOutTypeName(String outTypeName) getDotDelimitedProps(graphql.schema.DataFetchingEnvironment environment) getEntityProperties(graphql.schema.DataFetchingEnvironment environment) Filter out system properties such _instanceName or --typeName that not exist as entity fields.getNestedProps(Set<String> props, String propName) getPropertyPaths(graphql.schema.DataFetchingEnvironment environment) static StringgetRemoteIPAddress(Object context) booleanhasInstanceNameProperty(graphql.schema.DataFetchingEnvironment environment) booleanhasInstanceNameProperty(Set<String> props) propertyNotMatch(String property)
-
Constructor Details
-
EnvironmentUtils
public EnvironmentUtils()
-
-
Method Details
-
hasInstanceNameProperty
public boolean hasInstanceNameProperty(graphql.schema.DataFetchingEnvironment environment) - Parameters:
environment- gql data fetch environment- Returns:
- true if _instanceName should be returned for query, else false
-
hasInstanceNameProperty
- Parameters:
props- gql data fetch properties- Returns:
- true if _instanceName should be returned for query, else false
-
getDotDelimitedProps
-
getEntityProperties
Filter out system properties such _instanceName or --typeName that not exist as entity fields. Such properties must not be added in fetch plan.- Parameters:
environment- gql data fetch environment- Returns:
- only properties that exist in entity as fields
-
propertyNotMatch
- Parameters:
property- property to check- Returns:
- true if property NOT match 'someProperty' and '*.someProperty'
-
getNestedProps
-
getPropertyPaths
-
getPaths
-
getRemoteIPAddress
-
findMetaClassByOutTypeName
-