Add Support for Vector Data Type in SQL for GraphQL#3714
Draft
RubenCerna2079 wants to merge 4 commits into
Draft
Add Support for Vector Data Type in SQL for GraphQL#3714RubenCerna2079 wants to merge 4 commits into
RubenCerna2079 wants to merge 4 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why make this change?
What is this change?
[string]we moved the section that parses the scalar values to types hot chocolate can use in order output them to the user. This newCoerceJsonLeafValueToRuntimeTypemethod is then used in a loop to allow support for arrays inside theExecutionHelper.csfile.TryGetUnderlyingFieldKindinISqlMetadataProvider.csthat checks if the value is a list and it comes from a row that has theIsArrayType. If that condition is met, then it means the list value we have should be processed as a regular ScalarType and not as a List/Object that is a relationship to a different entity. This method is used in the following files:MultipleMutationInputValidator.cs,MultipleCreateOrderHelper.cs,SqlMutationEnginge.cs.GetStringifiedValuefunction that checks if the value that we are going to parse to the data base is a list or a regular value and transforms it into a string accordingly. Since we set all values as strings, this is something that cannot be directly done with a list as the.ToString()function will return a useless value. This value is then parsed before being used as a parameter in the data base query.How was this tested?
Added tests that query (read) from the data base as well as mutation (change) to the data base such as
create,update, anddelete.Sample Request(s)
Query
Create
Update
Delete