Skip to content

Commit

Permalink
fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shivaji-kharse committed Aug 26, 2024
1 parent 0a7816b commit 655af94
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 43 deletions.
40 changes: 1 addition & 39 deletions graphql/resolve/add_mutation_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5500,45 +5500,7 @@
{
"message": "failed to rewrite mutation payload because field id cannot be empty"
}

-
name: "Add Mutation referencing same XID in different types"
gqlmutation: |
mutation($input: [AddT1Input!]!) {
addT1(input: $input) {
t1 {
name
name1
name2
link {
name
name1
name3
}
}
}
}
gqlvariables: |
{
"input": [
{
"name": "Bob",
"name1": "Bob11",
"name2": "Bob2",
"link": {
"name": "Bob"
}
}
]
}
explanation: "As the link and top level object contain the same XID, Bob, this should throw an error"
error:
{
"message":
"failed to rewrite mutation payload because using duplicate XID value: Bob for XID: name for two different
implementing types of same interfaces: T1 and T2"
}


-
name: "Add mutation with @default directive"
gqlmutation: |
Expand Down
2 changes: 1 addition & 1 deletion graphql/schema/gqlschema_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2743,7 +2743,7 @@ invalid_schemas:
review: String!
}
errlist: [
{"message": "Type Product; @remote directive cannot be defined with @key directive", "locations": [ { "line": 176, "column": 12} ] },
{"message": "Type Product; @remote directive cannot be defined with @key directive", "locations": [ { "line": 181, "column": 12} ] },
]

- name: "directives defined on @external fields that are not @key."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ scalar Int64

"""
The DateTime scalar type represents date and time as a string in RFC3339 format.
For example: "1985-04-12T23:20:50.52Z" represents 20 minutes and 50.52 seconds after the 23rd hour of April 12th, 1985 in UTC.
For example: "1985-04-12T23:20:50.52Z" represents 20 mins 50.52 secs after the 23rd hour of Apr 12th 1985 in UTC.
"""
scalar DateTime

Expand Down Expand Up @@ -73,6 +73,7 @@ enum DgraphIndex {
day
hour
geo
hnsw
}

input AuthRule {
Expand Down Expand Up @@ -190,9 +191,10 @@ input GenerateMutationParams {
}

directive @hasInverse(field: String!) on FIELD_DEFINITION
directive @search(by: [DgraphIndex!]) on FIELD_DEFINITION
directive @search(by: [String!]) on FIELD_DEFINITION
directive @embedding on FIELD_DEFINITION
directive @dgraph(type: String, pred: String) on OBJECT | INTERFACE | FIELD_DEFINITION
directive @id on FIELD_DEFINITION
directive @id(interface: Boolean) on FIELD_DEFINITION
directive @default(add: DgraphDefault, update: DgraphDefault) on FIELD_DEFINITION
directive @withSubscription on OBJECT | INTERFACE | FIELD_DEFINITION
directive @secret(field: String!, pred: String) on OBJECT | INTERFACE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ input CustomHTTP {
skipIntrospection: Boolean
}

input DgraphDefault {
value: String
}

type Point {
longitude: Float!
latitude: Float!
Expand Down Expand Up @@ -200,6 +204,7 @@ directive @search(by: [String!]) on FIELD_DEFINITION
directive @embedding on FIELD_DEFINITION
directive @dgraph(type: String, pred: String) on OBJECT | INTERFACE | FIELD_DEFINITION
directive @id(interface: Boolean) on FIELD_DEFINITION
directive @default(add: DgraphDefault, update: DgraphDefault) on FIELD_DEFINITION
directive @withSubscription on OBJECT | INTERFACE | FIELD_DEFINITION
directive @secret(field: String!, pred: String) on OBJECT | INTERFACE
directive @auth(
Expand Down

0 comments on commit 655af94

Please sign in to comment.