Skip to content

Latest commit

 

History

History
81 lines (72 loc) · 883 Bytes

MatchStrategy.md

File metadata and controls

81 lines (72 loc) · 883 Bytes

Match Strategy

queries

The two queries below are considered matching:

{
    hero {
        name
        friends {
            name
            age
        }
    }
}
{
    hero {
        friends {
            age
            name
        }
        name
    }
}

But, these aren't:

{
    hero {
        name
        friends {
            name
            age
        }
    }
}
{
    hero {
        name
        friends {
            name
        }
    }
}

Variables

Similar rules apply for variable matching based on org.json.JsonObject.similar.

{
  "id": 1,
  "name": "John Doe"
}
{
  "name": "John Doe",
  "id": 1
}

However, the following two variables do not match because the order of the arrays is different.

{
  "ids": [1, 2, 3]
}
{
  "ids": [3, 2, 1]
}