graphql

2020-12-18T22:22:32.125900Z

So I was trying ^that out, right. I have a mutation that has a single input (relay style) which is an input type that has fields with directives. Say:

mutation {
  createUser(input: CreateUserInput!): CreateUserPaylaod
}

input CreateUserInput {
  userName: String! @myDirective
}
Now, looking through the selection (e.g. executor/selection), I’m trying to find this userName field with its directive. However, in (:field-definition selection) I can find that createUser has an argument named input with a type of CreateUserInput, but I can’t seem to find the definition of this input type, and consequently the directive on this userName input type field. Is that not yet exposed ^^?

➕ 1
2020-12-19T10:55:06.130100Z

That’s cool tho, I think I may be able to reconstruct it via the schema, and the knowledge that inputs are guaranteed non recursive

hlship 2021-01-01T01:56:50.132400Z

You can now go from a field selection to a Field and pick up the type system directives on the Field itself.

hlship 2021-01-01T01:57:53.132600Z

But I will in the future add a way to go to the schema type, not just the type name.

2020-12-18T22:23:19.126100Z

(I’m just exploring what is currently already possible with directives in lacinia)

2020-12-18T22:50:51.126600Z

Given the context, I can seem to find it in the schema, e.g.

(:CreateUserInput (:com.walmartlabs.lacinia.constants/schema context))
But, as far as I can tell (am I missing something obvious here?), I can’t find it in the selection part of that same context (the subselection I get from executor/selection)