Skip to content

Fix Unknow type merge bug on overloaded types #6494

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

Merged

Conversation

Moumouls
Copy link
Member

We got a subtile bug on named mutation with variables that contains type from custom schema overloaded on an auto schema field (see fixed test use case).

@Moumouls Moumouls added type:bug Impaired feature or lacking behavior that is likely assumed enhancement labels Mar 11, 2020
@Moumouls Moumouls requested a review from davimacedo March 11, 2020 16:32
@Moumouls Moumouls self-assigned this Mar 11, 2020
@codecov
Copy link

codecov bot commented Mar 11, 2020

Codecov Report

Merging #6494 into master will increase coverage by 0.04%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6494      +/-   ##
==========================================
+ Coverage   93.92%   93.97%   +0.04%     
==========================================
  Files         169      169              
  Lines       11808    11819      +11     
==========================================
+ Hits        11091    11107      +16     
+ Misses        717      712       -5     
Impacted Files Coverage Δ
src/GraphQL/ParseGraphQLSchema.js 97.40% <100.00%> (+0.15%) ⬆️
src/RestWrite.js 93.81% <0.00%> (+0.32%) ⬆️
src/Adapters/Storage/Mongo/MongoStorageAdapter.js 93.46% <0.00%> (+0.67%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 35d76b8...de284cd. Read the comment docs.

Copy link
Member

@davimacedo davimacedo left a comment

Choose a reason for hiding this comment

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

LGTM!

@davimacedo davimacedo merged commit 16a974a into parse-community:master Mar 11, 2020
@Moumouls
Copy link
Member Author

Moumouls commented Mar 11, 2020

@davimacedo
This is a first step, i'm currently investigating on issue about on the Query side:

ex:

This works

{
  collections {
    edges {
      node {
        id
        items {
          edges {
            node {
              id
              product {
                id
                variants(order: id_ASC) {
                  edges {
                    node {
                      id
                      picture {
                        url
                      }
                    }
                  }
                }
              }
              variants {
                edges {
                  node {
                    id
                    sku
                    size {
                      id
                    }
                    variant {
                      id
                      picture {
                        url
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

Throw an error, it seems to be related about keys/includes

{
  collections {
    edges {
      node {
        id
        items {
          edges {
            node {
              id
              product {
                id
                name(lang: fr) # HERE A CUSTOM FIELD WITH ARG
                # Keep a consistent order accross time
                variants(order: id_ASC) {
                  edges {
                    node {
                      id
                      picture {
                        url
                      }
                    }
                  }
                }
              }
              variants {
                edges {
                  node {
                    id
                    sku
                    size {
                      id
                    }
                    variant {
                      id
                      picture {
                        url
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}

Get an error on product.ID

UnderratedDev pushed a commit to UnderratedDev/parse-server that referenced this pull request Mar 21, 2020
* Fix Unknow type bug on overloaded types

* check args too
@mtrezza mtrezza removed type:bug Impaired feature or lacking behavior that is likely assumed 🧬 enhancement labels Jul 11, 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.

3 participants