code: def compile_graphql_to_sql(schema, graphql_string, compiler_metadata, type_equivalence_hints=None):
      
      lowering_func = ir_lowering_sql.lower_ir
      query_emitter_func = emit_sql.emit_code_from_ir
      return _compile_graphql_generic(
          SQL_LANGUAGE, lowering_func, query_emitter_func,
          schema, graphql_string, type_equivalence_hints, compiler_metadata)
docs: Compile the GraphQL input using the schema into a SQL query and associated metadata.
  
      Args:
          schema: GraphQL schema object describing the schema of the graph to be queried
          graphql_string: the GraphQL query to compile to SQL, as a string
          compiler_metadata: SQLAlchemy metadata containing tables for use during compilation.
          type_equivalence_hints: optional dict of GraphQL interface or type -> GraphQL union.
                                  Used as a workaround for GraphQL's lack of support for
                                  inheritance across "types" (i.e. non-interfaces), as well as a
                                  workaround for Gremlin's total lack of inheritance-awareness.
                                  The key-value pairs in the dict specify that the "key" type
                                  is equivalent to the "value" type, i.e. that the GraphQL type or
                                  interface in the key is the most-derived common supertype
                                  of every GraphQL type in the "value" GraphQL union.
                                  Recursive expansion of type equivalence hints is not performed,
                                  and only type-level correctness of this argument is enforced.
                                  See README.md for more details on everything this parameter does.
                                  *****
                                  Be very careful with this option, as bad input here will
                                  lead to incorrect output queries being generated.
                                  *****
  
      Returns:
          a CompilationResult object