I've spent the last week or two learning about GraphQL, Graphene, GraphQL-Yoga, Prisma, and React-Apollo server & client. I mostly followed the tutorials at https://www.howtographql.com/

Now I'm trying to apply what I've learned to build a real world application and in doing so I'm stepping out of the comfort zone of the "Happy Path" taught in the tutorials. One of the things I'm bumping into, which I am finding may be a common complaint on the GraphQL spec is that I'm having to retype the same thing over and over, and schema changes are a PITA.

I was hoping someone who knew what they were doing could review this PR and see if I'm going about this in the best way. I'm trying to reduce the amount of typing and changes I have to do when updating my schema on both the frontend and backend. I created a new Input to represent my FlightController type and then that allows me to not have to call-out every property in the front-end code when saving one. I don't have to repeat all the fields in the addFlightControllerEasy mutation. This is major progress in terms of terseness but it's far from where I'd like to be. The remaining PITA is that I have to define the flight-controller schema 3 times still.

This means that every time I refactor to make a change to the fields of the flight controller, I end up needing to go make a change in 3 different places. If these were defined as vanilla javascript objects I could use the spread operator to define this once and "mix" it into the other places. That way I could update it in one place and it would get included in the 3 places it's used. Any idea how to do this with Apollo-Server/GraphQL-yoga Types/Inputs?

https://github.com/coreysnyder04/drone-part-picker/pull/1/files