-
While trying to fetch fields using an introspection query, all the fields for which a user has permission to Select are fetched in the mutationType query fields. Eg. For a table 'Visits' a user has permission to select (id, f_name, l_name, dob, updated_at) fields and has permission to only Insert or update (f_name, l_name, dob) but all the fields are fetched while running a query to fetch only mutation type fields. I want to conditionally render the the input for fields a user can update/insert, can someone please guide me... |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Found the answer this issue can be closed now, If someone else looking for the answer then this query can be used to fetch the fields available for insert mutation. for update use 'visits_set_input' |
Beta Was this translation helpful? Give feedback.
Found the answer this issue can be closed now, If someone else looking for the answer then this query can be used to fetch the fields available for insert mutation.
{ __type(name: "visits_insert_input") { inputFields { name } } }
for update use 'visits_set_input'