Exemple #1
0
        private async Task <Schema> CreateSchema(string appId)
        {
            var applicationStore = _getApplicationStore();
            var app = await applicationStore.GetApp(appId);

            if (app == null)
            {
                throw new Exception($"Unable to generate GraphQL Schema for app {appId} because it was not found.");
            }

            var schema = new Schema();

            schema.Query = await AppTextQuery.CreateAsync(app, _getContentStore);

            return(schema);
        }
Exemple #2
0
        public static Task <AppTextQuery> CreateAsync(App app, Func <IContentStore> getContentStore)
        {
            var query = new AppTextQuery(app, getContentStore);

            return(query.InitializeFieldsAsync());
        }