有没有办法使用HTTP查询graphql服务器的突变模式?或者查询graphql server的整个架构的方法?谢谢!
答案 0 :(得分:9)
当然可以。官方GraphQL规范概述了the introspection specifics。获取可用突变的示例可能如此......
#include <iostream>
using namespace std;
int main()
{
int num1; //I get an error message when I do not set it to 0.
int num2;
int num3;
cout << "Please enter three numbers: " << endl;
cin >> num1; num2; num3;
if (num1 > num2 && num2 > num3){
cout << "In ascending order: " << num1 << num2 << num3 << endl;
}
else if (num2 > num1 && num1 > num3)
{
cout << "In ascending order: " << num2 << num1 << num3 << endl;
}
else if (num3 > num1 && num1 > num2){
cout << "In ascending order: " << num3 << num1 << num2 << endl;
}
else
{
cout << "There was an invalid input." << endl;
}
system("pause");
return 0;
}