-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug_schema.py
More file actions
65 lines (59 loc) · 1.43 KB
/
debug_schema.py
File metadata and controls
65 lines (59 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# debug_schema.py
import os
import json
from dotenv import load_dotenv
from grid_client import GridClient
# Load variables from .env file
load_dotenv()
def debug_schema():
api_key = os.getenv("GRID_API_KEY")
if not api_key:
print("❌ Error: GRID_API_KEY not found in .env file")
return
client = GridClient(api_key)
# Reset to original request to be sure, but let's check Match/Matches too
query = """
query {
__type(name: "Match") {
name
fields {
name
}
}
}
"""
print("\n🔍 Checking if 'Match' type exists...")
res = client._execute_query(query)
if res and res['__type']:
print("✅ 'Match' type exists. Fields:")
for f in res['__type']['fields']:
print(f" - {f['name']}")
query_series = """
query {
__type(name: "Series") {
fields {
name
type {
name
kind
ofType {
name
kind
ofType {
name
kind
}
}
}
}
}
}
"""
print("\n🔍 Re-checking 'Series' type fields...")
result = client._execute_query(query_series)
if result and result['__type']:
fields = result['__type']['fields']
for field in fields:
print(f" - {field['name']}")
if __name__ == "__main__":
debug_schema()