Failed to recognize directives input types
See original GitHub issueschema.gql
type User
@model(mutations: { create: "createUser", update: "updateUser" })
@auth(rules: [{
allow: owner,
provider: userPools,
ownerField: "id",
identityClaim: "sub",
operations: [update]
}])
{
id: ID! @Check(values: ["$ctx.identity.sub"])
firstName: String!
lastName: String!
avatar: File
address: Address # @FilterOut(cond: { op: NOT_EQUAL, values: ["$ctx.identity.sub"] })
phoneNumber: String # @FilterOut(cond: { op: NOT_EQUAL, values: ["$ctx.identity.sub"] })
currentOrganisationID: ID # @ReadOnly # set by a lambda
}
awsDirectives.graphql
scalar AWSDate
scalar AWSTime
scalar AWSDateTime
scalar AWSTimestamp
scalar AWSEmail
scalar AWSJSON
scalar AWSURL
scalar AWSPhone
scalar AWSIPAddress
##########################################################
## Model
##########################################################
directive @model(
queries: ModelQueryMap
mutations: ModelMutationMap
subscriptions: ModelSubscriptionMap
timestamps: TimestampConfiguration
) on OBJECT
input ModelMutationMap {
create: String
update: String
delete: String
}
input ModelQueryMap {
get: String
list: String
}
input ModelSubscriptionMap {
onCreate: [String]
onUpdate: [String]
onDelete: [String]
level: ModelSubscriptionLevel
}
enum ModelSubscriptionLevel {
off
public
on
}
input TimestampConfiguration {
createdAt: String
updatedAt: String
}
##########################################################
## Auth
##########################################################
directive @auth(rules: [AuthRule!]!) on OBJECT | FIELD_DEFINITION
input AuthRule {
allow: AuthStrategy!
provider: AuthProvider
ownerField: String # defaults to "owner" when using owner auth
identityClaim: String # defaults to "username" when using owner auth
groupClaim: String # defaults to "cognito:groups" when using Group auth
groups: [String] # Required when using Static Group auth
groupsField: String # defaults to "groups" when using Dynamic Group auth
operations: [ModelOperation] # Required for finer control
# The following arguments are deprecated. It is encouraged to use the 'operations' argument.
queries: [ModelQuery]
mutations: [ModelMutation]
}
enum AuthStrategy { owner groups private public }
enum AuthProvider { apiKey iam oidc userPools }
enum ModelOperation { create update delete read }
# The following objects are deprecated. It is encouraged to use ModelOperations.
enum ModelQuery { get list }
enum ModelMutation { create update delete }
##########################################################
## Key
##########################################################
directive @key(fields: [String!]!, name: String, queryField: String) on OBJECT
##########################################################
## Connextion
##########################################################
directive @connection(keyName: String, fields: [String!]) on FIELD_DEFINITION
##########################################################
## Function / Lambda
##########################################################
directive @function(name: String!, region: String) on FIELD_DEFINITION
##########################################################
## Searchable / Elasticsearch
##########################################################
# Streams data from DynamoDB to Elasticsearch and exposes search capabilities.
directive @searchable(queries: SearchableQueryMap) on OBJECT
input SearchableQueryMap { search: String }
##########################################################
## HTTP / Slack for ex
##########################################################
directive @http(method: HttpMethod, url: String!, headers: [HttpHeader]) on FIELD_DEFINITION
enum HttpMethod { PUT POST GET DELETE PATCH }
input HttpHeader {
key: String
value: String
}
The directives file is correctly included in .graphqlconfig
and the directives don’t have any issues. The issues come on the arguments of these directives and it looks like the plugin failed to find the input types. Can be related to https://github.com/jimkyndemeyer/js-graphql-intellij-plugin/issues/348
I’am using the latest WebStorm with the latest plugin version (2.6.0)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:6
Top Results From Across the Web
Failed to recognize directives input types · Issue #388 - GitHub
I was having the same problem and in my testing it seems that as soon as any of the defined directives are invalid...
Read more >Failed to recognize directives input types - Bountysource
Failed to recognize directives input types.
Read more >Directive restricting input is not working with type=number
1 Answer 1 ... There are two issues here. First, the maxlength attribute doesn't work with input type number . See e.g. maxlength...
Read more >NG8002: Unknown attribute or input - Angular
An @Input() property of a component or directive applied to the element. The runtime error for this is NG0304: '${tagName}' is not a...
Read more >Directives | RedwoodJS Docs
We call those types of directives Transformers. You'll recognize a directive as being 1) preceded by @ (e.g. @myDirective ) and 2) declared...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Any updates on this front? This is still happening in the @auth directive of amplify. Even when we use this defination
It will recognise “rules”, but It will not recognise “allow” field within “rules”. When can we expect this to be fixed?
Should be fixed in 3.0.0.
@noorulh06 Please, look at this comment https://github.com/jimkyndemeyer/js-graphql-intellij-plugin/issues/490#issuecomment-913064903.