Skip to content

Commit

Permalink
chore(into_children): avoid having children as root nodes (#2153)
Browse files Browse the repository at this point in the history
  • Loading branch information
ssddOnTop authored Jun 10, 2024
1 parent d5daf1d commit d8a8823
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 119 deletions.
1 change: 1 addition & 0 deletions src/core/ir/jit/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ impl ExecutionPlan {
let field_children = fields
.clone()
.into_iter()
.filter(|f| f.refs.is_none())
.map(|f| f.into_children(&fields))
.collect::<Vec<_>>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,5 @@ ExecutionPlan {
),
),
},
Field {
id: 1,
name: "id",
type_of: Int!,
},
],
}
Original file line number Diff line number Diff line change
Expand Up @@ -71,37 +71,5 @@ ExecutionPlan {
),
),
},
Field {
id: 1,
name: "user",
ir: "Some(..)",
type_of: User,
refs: Some(
Children(
[
Field {
id: 2,
name: "id",
type_of: Int!,
},
Field {
id: 3,
name: "name",
type_of: String!,
},
],
),
),
},
Field {
id: 2,
name: "id",
type_of: Int!,
},
Field {
id: 3,
name: "name",
type_of: String!,
},
],
}
Original file line number Diff line number Diff line change
Expand Up @@ -98,16 +98,6 @@ ExecutionPlan {
),
),
},
Field {
id: 1,
name: "id",
type_of: Int!,
},
Field {
id: 2,
name: "username",
type_of: String!,
},
Field {
id: 3,
name: "posts",
Expand All @@ -130,15 +120,5 @@ ExecutionPlan {
),
),
},
Field {
id: 4,
name: "id",
type_of: Int!,
},
Field {
id: 5,
name: "title",
type_of: String!,
},
],
}
Original file line number Diff line number Diff line change
Expand Up @@ -190,35 +190,5 @@ ExecutionPlan {
),
),
},
Field {
id: 1,
name: "id",
type_of: Int!,
},
Field {
id: 2,
name: "name",
type_of: String!,
},
Field {
id: 3,
name: "email",
type_of: String!,
},
Field {
id: 4,
name: "phone",
type_of: String,
},
Field {
id: 5,
name: "website",
type_of: String,
},
Field {
id: 6,
name: "username",
type_of: String!,
},
],
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,27 +58,5 @@ ExecutionPlan {
),
),
},
Field {
id: 1,
name: "user",
ir: "Some(..)",
type_of: User,
refs: Some(
Children(
[
Field {
id: 2,
name: "id",
type_of: Int!,
},
],
),
),
},
Field {
id: 2,
name: "id",
type_of: Int!,
},
],
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,5 @@ ExecutionPlan {
),
),
},
Field {
id: 1,
name: "id",
type_of: Int!,
},
Field {
id: 2,
name: "name",
type_of: String!,
},
],
}

1 comment on commit d8a8823

@github-actions
Copy link

Choose a reason for hiding this comment

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

Running 30s test @ http://localhost:8000/graphql

4 threads and 100 connections

Thread Stats Avg Stdev Max +/- Stdev
Latency 6.74ms 3.14ms 88.22ms 72.66%
Req/Sec 3.76k 200.36 4.08k 91.42%

448595 requests in 30.00s, 2.25GB read

Requests/sec: 14951.57

Transfer/sec: 76.74MB

Please sign in to comment.