bendeckdavid/graphql-client — reverse-engineered prompt

Reverse engineered prompt

Build me a minimal Laravel package for talking to GraphQL APIs. I want to set a default endpoint in the env file, optionally put credentials there too, and have auth use the Authorization header with Bearer by default, but still let me change the header name and auth style if needed.

Make it really easy to use, ideally with a GraphQL facade where I can run a query or mutation and call get() for parsed data, get('json') for JSON, or getRaw() for the untouched response. It should support variables for raw operations, including a nice fluent shortcut like withName("David"), plus runtime token overrides, custom headers, request context options, and the ability to point one request at a different endpoint.

Please keep it small and clean, with sensible defaults, a simple config setup, and a README with examples that work against a public GraphQL API like SpaceX. You can look up current Laravel package docs online if you need to.

Want more depth? Deep Reverse