Skip to content

Commit

Permalink
GraphQL Glean: Add schema name to BelongToConfig
Browse files Browse the repository at this point in the history
Summary:
Since GraphQL types are unique per schema, we need to know the schema name for diff labeling. (Probably for IDE support / navigation tasks too, if we're being rigorous.)

This diff adds it to the GraphQL Glean schema alongside the build config name. It is a property of the build config.

The schema name is technically optional in the build config, so I propagated that through here. (It has to be optional in the Glean schema anyway for backwards compatibility.)

Reviewed By: ginfung

Differential Revision: D68475056

fbshipit-source-id: a28e19cbde9e2fc1f3a3e0778d51df659659275f
  • Loading branch information
Stephen Schwink authored and facebook-github-bot committed Jan 23, 2025
1 parent 858b560 commit 7824af3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions glean/schema/cpp/schema.h
Original file line number Diff line number Diff line change
Expand Up @@ -14368,7 +14368,7 @@ struct DeclHasName : Predicate<std::tuple<Declaration, Fact<Value>>> {
}
}; // struct DeclHasName

struct BelongToConfig : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, Fact<Value>>> {
struct BelongToConfig : Predicate<std::tuple<Fact<facebook::glean::cpp::schema::Src::File>, Fact<Value>, boost::variant<Alt<0, std::tuple<>>, Alt<1, Fact<Value>>>>> {
static const char* GLEAN_name() {
return "graphql.BelongToConfig";
}
Expand Down Expand Up @@ -29624,7 +29624,7 @@ struct ArgumentValue : Predicate<boost::variant<Alt<0, std::string>, Alt<1, std:
struct SCHEMA {
template<typename P> struct index;
static constexpr size_t count = 1322;
static constexpr char schemaId[] = "b420d3d2d0c3f0dc83bd186eea865a40";
static constexpr char schemaId[] = "0926df660cc94c58a7eb5ab3dd23bd52";
template<size_t i> struct predicate;
};

Expand Down
1 change: 1 addition & 0 deletions glean/schema/source/graphql.angle
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ predicate BelongToConfig:
{
file: src.File,
buildConfig: Value,
schema: maybe Value,
}

predicate ScalarTypeDef :
Expand Down

0 comments on commit 7824af3

Please sign in to comment.