graphql-http 2.2.0__tar.gz → 2.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. {graphql_http-2.2.0 → graphql_http-2.2.1}/PKG-INFO +1 -1
  2. graphql_http-2.2.1/VERSION +1 -0
  3. {graphql_http-2.2.0 → graphql_http-2.2.1}/graphql_http/graphiql/index.html +10 -0
  4. {graphql_http-2.2.0 → graphql_http-2.2.1}/graphql_http/server.py +4 -0
  5. {graphql_http-2.2.0 → graphql_http-2.2.1}/graphql_http.egg-info/PKG-INFO +1 -1
  6. graphql_http-2.2.0/VERSION +0 -1
  7. {graphql_http-2.2.0 → graphql_http-2.2.1}/.coverage +0 -0
  8. {graphql_http-2.2.0 → graphql_http-2.2.1}/.github/workflows/pages.yml +0 -0
  9. {graphql_http-2.2.0 → graphql_http-2.2.1}/.github/workflows/python-package.yml +0 -0
  10. {graphql_http-2.2.0 → graphql_http-2.2.1}/.gitignore +0 -0
  11. {graphql_http-2.2.0 → graphql_http-2.2.1}/.gitmodules +0 -0
  12. {graphql_http-2.2.0 → graphql_http-2.2.1}/LICENSE +0 -0
  13. {graphql_http-2.2.0 → graphql_http-2.2.1}/README.md +0 -0
  14. {graphql_http-2.2.0 → graphql_http-2.2.1}/docs/.gitmodules +0 -0
  15. {graphql_http-2.2.0 → graphql_http-2.2.1}/docs/content/_index.md +0 -0
  16. {graphql_http-2.2.0 → graphql_http-2.2.1}/docs/content/docs/_index.md +0 -0
  17. {graphql_http-2.2.0 → graphql_http-2.2.1}/docs/content/docs/api-reference.md +0 -0
  18. {graphql_http-2.2.0 → graphql_http-2.2.1}/docs/content/docs/authentication.md +0 -0
  19. {graphql_http-2.2.0 → graphql_http-2.2.1}/docs/content/docs/configuration.md +0 -0
  20. {graphql_http-2.2.0 → graphql_http-2.2.1}/docs/content/docs/examples.md +0 -0
  21. {graphql_http-2.2.0 → graphql_http-2.2.1}/docs/content/docs/getting-started.md +0 -0
  22. {graphql_http-2.2.0 → graphql_http-2.2.1}/docs/content/docs/testing.md +0 -0
  23. {graphql_http-2.2.0 → graphql_http-2.2.1}/docs/hugo.toml +0 -0
  24. {graphql_http-2.2.0 → graphql_http-2.2.1}/docs/index.md +0 -0
  25. {graphql_http-2.2.0 → graphql_http-2.2.1}/example_advanced_server.py +0 -0
  26. {graphql_http-2.2.0 → graphql_http-2.2.1}/examples/README.md +0 -0
  27. {graphql_http-2.2.0 → graphql_http-2.2.1}/examples/__init__.py +0 -0
  28. {graphql_http-2.2.0 → graphql_http-2.2.1}/examples/advanced_server.py +0 -0
  29. {graphql_http-2.2.0 → graphql_http-2.2.1}/examples/auth_server.py +0 -0
  30. {graphql_http-2.2.0 → graphql_http-2.2.1}/examples/basic_server.py +0 -0
  31. {graphql_http-2.2.0 → graphql_http-2.2.1}/examples/graphql_api_server.py +0 -0
  32. {graphql_http-2.2.0 → graphql_http-2.2.1}/graphql_http/__init__.py +0 -0
  33. {graphql_http-2.2.0 → graphql_http-2.2.1}/graphql_http/error.py +0 -0
  34. {graphql_http-2.2.0 → graphql_http-2.2.1}/graphql_http/helpers.py +0 -0
  35. {graphql_http-2.2.0 → graphql_http-2.2.1}/graphql_http/introspection.py +0 -0
  36. {graphql_http-2.2.0 → graphql_http-2.2.1}/graphql_http.egg-info/SOURCES.txt +0 -0
  37. {graphql_http-2.2.0 → graphql_http-2.2.1}/graphql_http.egg-info/dependency_links.txt +0 -0
  38. {graphql_http-2.2.0 → graphql_http-2.2.1}/graphql_http.egg-info/requires.txt +0 -0
  39. {graphql_http-2.2.0 → graphql_http-2.2.1}/graphql_http.egg-info/top_level.txt +0 -0
  40. {graphql_http-2.2.0 → graphql_http-2.2.1}/pyproject.toml +0 -0
  41. {graphql_http-2.2.0 → graphql_http-2.2.1}/setup.cfg +0 -0
  42. {graphql_http-2.2.0 → graphql_http-2.2.1}/test_server.py +0 -0
  43. {graphql_http-2.2.0 → graphql_http-2.2.1}/tests/__init__.py +0 -0
  44. {graphql_http-2.2.0 → graphql_http-2.2.1}/tests/app.py +0 -0
  45. {graphql_http-2.2.0 → graphql_http-2.2.1}/tests/app_federation.py +0 -0
  46. {graphql_http-2.2.0 → graphql_http-2.2.1}/tests/conftest.py +0 -0
  47. {graphql_http-2.2.0 → graphql_http-2.2.1}/tests/test_auth.py +0 -0
  48. {graphql_http-2.2.0 → graphql_http-2.2.1}/tests/test_cors.py +0 -0
  49. {graphql_http-2.2.0 → graphql_http-2.2.1}/tests/test_examples.py +0 -0
  50. {graphql_http-2.2.0 → graphql_http-2.2.1}/tests/test_federation.py +0 -0
  51. {graphql_http-2.2.0 → graphql_http-2.2.1}/tests/test_graphql_api.py +0 -0
  52. {graphql_http-2.2.0 → graphql_http-2.2.1}/tests/test_introspection.py +0 -0
  53. {graphql_http-2.2.0 → graphql_http-2.2.1}/tests/test_linting.py +0 -0
  54. {graphql_http-2.2.0 → graphql_http-2.2.1}/tests/test_server.py +0 -0
  55. {graphql_http-2.2.0 → graphql_http-2.2.1}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graphql-http
3
- Version: 2.2.0
3
+ Version: 2.2.1
4
4
  Summary: HTTP Server for GraphQL.
5
5
  Author-email: Robert Parker <rob@parob.com>
6
6
  License: MIT
@@ -0,0 +1 @@
1
+ 2.2.1
@@ -176,6 +176,16 @@
176
176
  } from 'reactflow';
177
177
  import ELK from 'elkjs';
178
178
 
179
+ // Environment-injected Gemini API key (set via GRAPHIQL_GEMINI_API_KEY env var)
180
+ const ENV_GEMINI_API_KEY = 'GEMINI_API_KEY_PLACEHOLDER';
181
+
182
+ // Initialize env API key to localStorage if not already set
183
+ if (ENV_GEMINI_API_KEY && ENV_GEMINI_API_KEY !== 'GEMINI_API_KEY_PLACEHOLDER') {
184
+ if (!localStorage.getItem('graphiql:gemini-api-key')) {
185
+ localStorage.setItem('graphiql:gemini-api-key', ENV_GEMINI_API_KEY);
186
+ }
187
+ }
188
+
179
189
  // Custom Graph Node - contains our entire graph visualization
180
190
  const GraphVisualizationNode = ({ data }) => {
181
191
  const { getViewport, fitBounds, setViewport, zoomIn, zoomOut } = useReactFlow();
@@ -370,6 +370,10 @@ class GraphQLHTTP:
370
370
  html_content = f.read()
371
371
  html_content = html_content.replace("DEFAULT_QUERY", default_query)
372
372
 
373
+ # Inject Gemini API key from environment if set
374
+ gemini_api_key = os.environ.get("GRAPHIQL_GEMINI_API_KEY", "")
375
+ html_content = html_content.replace("GEMINI_API_KEY_PLACEHOLDER", gemini_api_key)
376
+
373
377
  return HTMLResponse(html_content)
374
378
 
375
379
  def _handle_options(self, request: Request) -> Optional[Response]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graphql-http
3
- Version: 2.2.0
3
+ Version: 2.2.1
4
4
  Summary: HTTP Server for GraphQL.
5
5
  Author-email: Robert Parker <rob@parob.com>
6
6
  License: MIT
@@ -1 +0,0 @@
1
- 2.2.0
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes