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

TODO/FIXME added in PR #4038 Port to apollo-compiler 1.0 beta #4040

Open
5 tasks
SimonSapin opened this issue Oct 16, 2023 · 0 comments
Open
5 tasks

TODO/FIXME added in PR #4038 Port to apollo-compiler 1.0 beta #4040

SimonSapin opened this issue Oct 16, 2023 · 0 comments

Comments

@SimonSapin
Copy link
Contributor

SimonSapin commented Oct 16, 2023

While making #4038 I found some things I didn’t change in that PR (it’s already big as-is) but we may want to look at again:

  • AuthorizationPlugin::filter_query parses key.filtered_query as a GraphQL string. Is this a string we’ve only just serialized from an ast::Document or Executable document? Could we re-use those instead?
  • For an enum type, validate_input_value accepts any JSON value. Should it only accept strings equal to one of the enum values definied in the schema?
  • For an input object type, validate_input_value only looks at fields defined in the schema. Should it also reject JSON objects that contain any key not defined as an input object field in the schema?
  • AuthorizationPlugin::filter_query looks at whether the filtered document is empty. Should it only consider the relevant operation instead? filtered_doc.get_operation(key.operation_name)
  • Schema::is_implementation(interface: &str, implementor: &str) -> bool contains interface.implements_interfaces.contains(implementor) (previously interface.implements_interfaces().any(|i| i.interface() == implementor)). This looks backwards.
@SimonSapin SimonSapin changed the title TODOs added in PR #4038 Port to apollo-compiler 1.0 beta TODO/FIXME added in PR #4038 Port to apollo-compiler 1.0 beta Oct 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant