INNER CODE UNIT · Go

newSchema

movio/bramble · auth.go:145

	newSchema := *schema
	newSchema.Types = make(map[string]*ast.Definition)

	newSchema.Query = filterDefinition(schema, nil, newSchema.Types, schema.Query, o.AllowedRootQueryFields)
	if newSchema.Query != nil {
		newSchema.Types["Query"] = newSchema.Query
	}
	newSchema.Mutation = filterDefinition(schema, nil, newSchema.Types, schema.Mutation, o.AllowedRootMutationFields)
	if newSchema.Mutation != nil {
		newSchema.Types["Mutation"] = newSchema.Mutation
	}
	newSchema.Subscription = filterDefinition(schema, nil, newSchema.Types, schema.Subscription, o.AllowedRootSubscriptionFields)
	if newSchema.Subscription != nil {
		newSchema.Types["Subscription"] = newSchema.Subscription
	}

	return &newSchema
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…