The type of CreateCompanyOutput for company create mutation is defined as type "Company". The fields of Company in current implementation have their own resolver in which the authorization will be checked. It would fail for creating company because in this case we do not have a logged in user.
Solution
Update schema with base fields like the response for company registration in frontend. No additional fields like "role", "users", "structure" etc.
Problem
The type of CreateCompanyOutput for company create mutation is defined as type "Company". The fields of Company in current implementation have their own resolver in which the authorization will be checked. It would fail for creating company because in this case we do not have a logged in user.
Solution
Update schema with base fields like the response for company registration in frontend. No additional fields like "role", "users", "structure" etc.
Requested Reviewers
@paliarush @cpartica @danielrenaud