Package io.jmix.graphql.datafetcher
Class EnvironmentUtils
java.lang.Object
io.jmix.graphql.datafetcher.EnvironmentUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected MetaClass
findMetaClassByOutTypeName
(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 String
getRemoteIPAddress
(Object context) boolean
hasInstanceNameProperty
(graphql.schema.DataFetchingEnvironment environment) boolean
hasInstanceNameProperty
(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
-