Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -602,39 +602,6 @@ final class Data
}
```

## Configuration

The fluent configuration API gives you full control:

```php
<?php

use GraphQLClientCodeGenerator\Config\Config;

return Config::create('src/Generated/GraphQL')
// 📄 Schema source (pick one)
->withSchema(__DIR__ . '/schema.graphql') // Local file
->withSchemaIntrospection('https://api.github.com/graphql') // Live endpoint

// 🔍 Where to find operations
->withOperations(__DIR__ . '/queries') // .graphql files
->withPhpOperations(__DIR__ . '/src') // Inline PHP operations
->withTwigOperations(__DIR__ . '/templates') // Twig templates

// 📦 Namespace & naming
->withNamespace('App\\Generated\\GitHub')

// ⚙️ Customization
->withConnectionNaming() // Use Connection/Edge/Node naming
->withAutoFormatting() // Format generated .graphql files
->withCustomScalar('DateTime', 'DateTimeImmutable')
->withCustomScalar('JSON', 'array')

// 🔌 Client integration
->withClientInterface('App\\GraphQL\\ClientInterface')
->withClientVariable('client');
```

## Requirements

- **PHP 8.4+** (uses property hooks, readonly classes, and other modern features)
Expand Down