예제 #1
0
        public void MutationValue_Test()
        {
            var root         = new RootQuery();
            var mutation     = new RootMutation();
            var schema       = new GraphQlRootSchema(root, mutation);
            var queryBuilder = new BasicQueryBuilder();

            schema.Register(queryBuilder);
            var actual = schema.Mutation.Fields.First(p => p.Name == "mutationTest").Resolver.Resolve(
                new ResolveFieldContext()
            {
                Arguments = new Dictionary <string, object>()
                {
                    {
                        "input", new TestInputType()
                        {
                            Input = "Hello World",
                        }
                    },
                },
            });

            Assert.Equal("Hello World", actual);
        }
예제 #2
0
 public void SetGroup(RootMutation mutation)
 {
     mutation.Field <ArticleMutation>(
         "articles",
         resolve: context => new { });
 }
예제 #3
0
 public void SetGroup(RootMutation mutation)
 {
     mutation.Field <UserFriendMutation>(
         "friend",
         resolve: _ => new { });
 }
예제 #4
0
 public void SetGroup(RootMutation mutation)
 {
     mutation.Field <ExplorationMutations>(
         "explorations",
         resolve: context => new { });
 }
예제 #5
0
 public void SetGroup(RootMutation mutation)
 {
     mutation.Field <HouseMutation>(
         "house",
         resolve: _ => new { });
 }
 public TestSchema()
 {
     Mutation = new RootMutation();
 }
예제 #7
0
 public void SetGroup(RootMutation mutation)
 {
     mutation.Field <AccountMutation>(
         "account",
         resolve: _ => new { });
 }
예제 #8
0
 public void SetGroup(RootMutation mutation)
 {
     mutation.Field <UserMutations>(
         "user",
         resolve: context => new { });
 }
예제 #9
0
 public void SetGroup(RootMutation mutation)
 {
     mutation.Field <PlanetMutations>(
         "planets",
         resolve: context => new { });
 }
예제 #10
0
 public void SetGroup(RootMutation mutation)
 {
     mutation.Field <RobotMutations>(
         "robots",
         resolve: context => new { });
 }
예제 #11
0
 public void SetGroup(RootMutation mutation)
 {
     mutation.Field <UserMutation>(
         "users",
         resolve: _ => new { });
 }
예제 #12
0
 public AppliedSchema()
 {
     Mutation = new RootMutation();
     Directives.Register(new TraitsDirective());
     this.ApplyDirective("traits", "quality", "high");
 }
 public void SetGroup(RootMutation mutation)
 {
     mutation.Field <ContributorMutation>(
         "contributor",
         resolve: _ => new { });
 }
 public void SetGroup(RootMutation mutation)
 {
     mutation.Field <ScheduleMutation>(
         "schedule",
         resolve: _ => new { });
 }
예제 #15
0
 public void SetGroup(RootMutation mutation)
 {
     mutation.Field <CaptainMutations>(
         "captains",
         resolve: context => new { });
 }
예제 #16
0
 public void SetGroup(RootMutation mutation)
 {
     mutation.Field <ExplorersTeamMutations>(
         FIELD_NAME,
         resolve: context => new { });
 }
예제 #17
0
 public void SetGroup(RootMutation mutation)
 {
     mutation.Field <ShuttleMutations>(
         "shuttles",
         resolve: context => new { });
 }
예제 #18
0
 public void SetGroup(RootMutation mutation)
 {
     mutation.Field <ReportMutation>(
         "report",
         resolve: _ => new { });
 }
예제 #19
0
 public void SetGroup(RootMutation mutation)
 {
     mutation.Field <PublisherMutation>(
         "publishers",
         resolve: context => new { });
 }
 public void SetGroup(RootMutation mutation)
 {
     mutation.Field <MaterialExpenditureMutation>(
         "expenditures",
         resolve: _ => new { });
 }
예제 #21
0
 public void SetGroup(RootMutation mutation)
 {
     mutation.Field <RoomJobMutation>(
         "roomJob",
         resolve: _ => new { });
 }
 public void SetGroup(RootMutation mutation)
 {
 }
예제 #23
0
 public EntriesSchema(RootQuery query, RootMutation mutation, IDependencyResolver resolver)
 {
     Query              = query;
     Mutation           = mutation;
     DependencyResolver = resolver;
 }
예제 #24
0
 public void SetGroup(RootMutation mutation)
 {
     mutation.Field <LoginMutation>(
         "login",
         resolve: _ => new { });
 }
예제 #25
0
 public void SetGroup(RootMutation mutation)
 {
     mutation.Field <PermissionMutations>(
         "permissions",
         resolve: context => new { });
 }
 public void SetGroup(RootMutation mutation)
 {
     mutation.Field <PlanetMutations>(
         FIELD_NAME,
         resolve: context => new { });
 }
 public TestSchema()
 {
     Mutation = new RootMutation();
 }
예제 #28
0
 public void SetGroup(RootMutation mutation)
 {
     mutation.Field <TeamMutations>(
         "teams",
         resolve: context => new { });
 }