Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thoughts: client fields defined in node_modules #437

Open
rbalicki2 opened this issue Feb 25, 2025 · 1 comment
Open

Thoughts: client fields defined in node_modules #437

rbalicki2 opened this issue Feb 25, 2025 · 1 comment

Comments

@rbalicki2
Copy link
Collaborator

We would like to define client fields in node_modules, and have those seamlessly work with our existing codebase

Each client field is defined according to some schema. The schema can't be global.

There needs to be some notion of compatibility between the schema used by a given client field and the schema where we are using the client field. And there can be some notion of transforms.

So, e.g. you might have a client field that expects a full_name field to exist (this is the client field schema). And you might be using it (i.e. root schema) in a world where first_name and last_name exist.

We should be able to say that to transform the client field schema to the root schema, use a client field full_name: data.first_name + data.last_name.

This concept should (of course) be independent of GraphQL.

Anyway, this obviously needs work.

@rbalicki2
Copy link
Collaborator Author

So this implies that in our own codebase, there shouldn't be a global schema.graphql, but instead it should be discovered? And specific to a particular folder? Idk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant