Skip to content

refactor the normalized input to contain literals and add AST Compiler#2338

Merged
andimarek merged 12 commits into
masterfrom
normalized-input
May 24, 2021
Merged

refactor the normalized input to contain literals and add AST Compiler#2338
andimarek merged 12 commits into
masterfrom
normalized-input

Conversation

@andimarek

@andimarek andimarek commented May 14, 2021

Copy link
Copy Markdown
Member

It refactors the normalized input to reference literals and not internal input values.

It also adds a way to convert a Normalized query to an Ast.

*/
public static Object externalValueToInternalValue(GraphqlFieldVisibility fieldVisibility, Object externalValue, GraphQLInputType type) {
return new ValuesResolver().externalValueToInternalValue(fieldVisibility, type, externalValue, ValueMode.COERCED);
return new ValuesResolver().externalValueToInternalValue(fieldVisibility, type, externalValue);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a bad pattern BTW - that is ValuesResolver is a stateless class - so make it method static.

No object allocation needed - even with escape analysis its a bit better

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah .. not really happy about it myself... changed it

@andimarek andimarek changed the base branch from literal-to-value-coercing to master May 24, 2021 05:15
@andimarek andimarek added this to the 17.0 milestone May 24, 2021
@andimarek andimarek changed the title refactor the normalized input to contain literals refactor the normalized input to contain literals and add AST Compiler May 24, 2021
@andimarek andimarek merged commit 5060b63 into master May 24, 2021
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

Successfully merging this pull request may close these issues.

2 participants