Skip to content

Commit fe2351e

Browse files
committed
docs
1 parent 4232c94 commit fe2351e

File tree

10 files changed

+26
-26
lines changed

10 files changed

+26
-26
lines changed

src/Tests/IntegrationTests/Graphs/Inheritance/InheritedEntity.cs renamed to src/Tests/IntegrationTests/Graphs/Inheritance/BaseEntity.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
public abstract class InheritedEntity
1+
public abstract class BaseEntity
22
{
33
public Guid Id { get; set; } = Guid.NewGuid();
44
public string? Property { get; set; }

src/Tests/IntegrationTests/Graphs/Inheritance/InterfaceGraphType.cs renamed to src/Tests/IntegrationTests/Graphs/Inheritance/BaseGraphType.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
public class InterfaceGraphType :
2-
EfInterfaceGraphType<IntegrationDbContext, InheritedEntity>
1+
public class BaseGraphType :
2+
EfInterfaceGraphType<IntegrationDbContext, BaseEntity>
33
{
4-
public InterfaceGraphType(IEfGraphQLService<IntegrationDbContext> graphQlService) :
4+
public BaseGraphType(IEfGraphQLService<IntegrationDbContext> graphQlService) :
55
base(graphQlService)
66
{
77
Field(_ => _.Id);

src/Tests/IntegrationTests/Graphs/Inheritance/DerivedChildEntity.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
public Guid Id { get; set; } = Guid.NewGuid();
44
public string? Property { get; set; }
55
public Guid? ParentId { get; set; }
6-
public InheritedEntity? Parent { get; set; }
6+
public BaseEntity? Parent { get; set; }
77
public Guid? TypedParentId { get; set; }
88
public DerivedWithNavigationEntity? TypedParent { get; set; }
99
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11

22
public class DerivedEntity :
3-
InheritedEntity;
3+
BaseEntity;

src/Tests/IntegrationTests/Graphs/Inheritance/DerivedGraphType.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public DerivedGraphType(IEfGraphQLService<IntegrationDbContext> graphQlService)
88
name: "childrenFromInterface",
99
_ => _.Source.ChildrenFromBase);
1010
AutoMap();
11-
Interface<InterfaceGraphType>();
11+
Interface<BaseGraphType>();
1212
IsTypeOf = obj => obj is DerivedEntity;
1313
}
1414
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
public class DerivedWithNavigationEntity : InheritedEntity
1+
public class DerivedWithNavigationEntity : BaseEntity
22
{
33
public IList<DerivedChildEntity> Children { get; set; } = [];
44
}

src/Tests/IntegrationTests/Graphs/Inheritance/DerivedWithNavigationGraphType.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public DerivedWithNavigationGraphType(IEfGraphQLService<IntegrationDbContext> gr
1212
_ => _.Source.Children,
1313
includeNames: [ "Children" ]);
1414
AutoMap();
15-
Interface<InterfaceGraphType>();
15+
Interface<BaseGraphType>();
1616
IsTypeOf = obj => obj is DerivedWithNavigationEntity;
1717
}
1818
}

src/Tests/IntegrationTests/IntegrationTests.SchemaPrint.verified.txt

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@
6969
last: Int,
7070
where: [WhereExpression!],
7171
orderBy: [OrderBy!],
72-
ids: [ID!]): InterfaceConnection!
72+
ids: [ID!]): BaseConnection!
7373
manyToManyLeftEntities(id: ID, ids: [ID!], where: [WhereExpression!], orderBy: [OrderBy!], skip: Int, take: Int): [ManyToManyLeft!]!
7474
manyToManyRightEntities(id: ID, ids: [ID!], where: [WhereExpression!], orderBy: [OrderBy!], skip: Int, take: Int): [ManyToManyRight!]!
7575
parentEntityViews(where: [WhereExpression!], orderBy: [OrderBy!], skip: Int, take: Int): [ParentEntityView!]!
@@ -452,27 +452,27 @@ type FilterParentEdge {
452452
node: FilterParent!
453453
}
454454

455-
"A connection from an object to a list of objects of type `Interface`."
456-
type InterfaceConnection {
455+
"A connection from an object to a list of objects of type `Base`."
456+
type BaseConnection {
457457
"A count of the total number of objects in this connection, ignoring pagination. This allows a client to fetch the first five objects by passing \"5\" as the argument to `first`, then fetch the total count so it could display \"5 of 83\", for example. In cases where we employ infinite scrolling or don't have an exact count of entries, this field will return `null`."
458458
totalCount: Int
459459
"Information to aid in pagination."
460460
pageInfo: PageInfo!
461461
"A list of all of the edges returned in the connection."
462-
edges: [InterfaceEdge]
462+
edges: [BaseEdge]
463463
"A list of all of the objects returned in the connection. This is a convenience field provided for quickly exploring the API; rather than querying for \"{ edges { node } }\" when no edge data is needed, this field can be used instead. Note that when clients like Relay need to fetch the \"cursor\" field on the edge to enable efficient pagination, this shortcut cannot be used, and the full \"{ edges { node } } \" version should be used instead."
464-
items: [Interface]
464+
items: [Base]
465465
}
466466

467-
"An edge in a connection from an object to another object of type `Interface`."
468-
type InterfaceEdge {
467+
"An edge in a connection from an object to another object of type `Base`."
468+
type BaseEdge {
469469
"A cursor for use in pagination"
470470
cursor: String!
471471
"The item at the end of the edge"
472-
node: Interface
472+
node: Base
473473
}
474474

475-
interface Interface {
475+
interface Base {
476476
id: ID!
477477
property: String
478478
childrenFromInterface(
@@ -567,7 +567,7 @@ type Mutation {
567567
parentEntityMutation(id: ID, ids: [ID!], where: [WhereExpression!]): Parent!
568568
}
569569

570-
type Derived implements Interface {
570+
type Derived implements Base {
571571
childrenFromInterface(
572572
"Only return edges after the specified cursor."
573573
after: String,
@@ -585,7 +585,7 @@ type Derived implements Interface {
585585
property: String
586586
}
587587

588-
type DerivedWithNavigation implements Interface {
588+
type DerivedWithNavigation implements Base {
589589
childrenFromInterface(
590590
"Only return edges after the specified cursor."
591591
after: String,

src/Tests/IntegrationTests/MyDataContext.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class IntegrationDbContext(DbContextOptions options) :
2323
public DbSet<Child1Entity> Child1Entities { get; set; } = null!;
2424
public DbSet<Child2Entity> Child2Entities { get; set; } = null!;
2525
public DbSet<ParentEntityView> ParentEntityView { get; set; } = null!;
26-
public DbSet<InheritedEntity> InheritedEntities { get; set; } = null!;
26+
public DbSet<BaseEntity> BaseEntities { get; set; } = null!;
2727
public DbSet<ManyToManyLeftEntity> ManyToManyLeftEntities { get; set; } = null!;
2828
public DbSet<ManyToManyRightEntity> ManyToManyRightEntities { get; set; } = null!;
2929
public DbSet<ManyToManyMiddleEntity> ManyToManyMiddleEntities { get; set; } = null!;
@@ -58,9 +58,9 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
5858
modelBuilder.Entity<NamedIdEntity>();
5959
modelBuilder.Entity<OwnedParent>();
6060
modelBuilder.Entity<Child2Entity>();
61-
modelBuilder.Entity<DerivedEntity>().HasBaseType<InheritedEntity>();
61+
modelBuilder.Entity<DerivedEntity>().HasBaseType<BaseEntity>();
6262
modelBuilder.Entity<DerivedWithNavigationEntity>()
63-
.HasBaseType<InheritedEntity>()
63+
.HasBaseType<BaseEntity>()
6464
.HasMany(_ => _.Children)
6565
.WithOne(_ => _.TypedParent!)
6666
.HasForeignKey(_ => _.TypedParentId);

src/Tests/IntegrationTests/Query.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,11 @@ public Query(IEfGraphQLService<IntegrationDbContext> efGraphQlService)
131131
resolve: _ => _.DbContext.ParentEntities,
132132
nullable: true);
133133

134-
efGraphQlService.AddQueryConnectionField<InheritedEntity>(
134+
efGraphQlService.AddQueryConnectionField<BaseEntity>(
135135
this,
136-
itemGraphType: typeof(InterfaceGraphType),
136+
itemGraphType: typeof(BaseGraphType),
137137
name: "interfaceGraphConnection",
138-
resolve: _ => _.DbContext.InheritedEntities.OrderBy(_ => _.Property));
138+
resolve: _ => _.DbContext.BaseEntities.OrderBy(_ => _.Property));
139139

140140
AddQueryField(
141141
name: "manyToManyLeftEntities",

0 commit comments

Comments
 (0)